-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTinderboxIO.swift
More file actions
48 lines (35 loc) · 1.17 KB
/
TinderboxIO.swift
File metadata and controls
48 lines (35 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// TinderboxIO.swift
// TinderboxParser
//
// Created by michael isbell on 8/5/19.
// Copyright © 2019 michael isbell. All rights reserved.
//
import Foundation
import Cocoa
struct TinderboxIO {
var tbxfileURL: URL?
mutating func loadTinderboxXmlDocument() {
// print("well done tb")
let openFileTypes = ["tbx"]
let openPanel = NSOpenPanel()
openPanel.allowsMultipleSelection = false
openPanel.canChooseDirectories = true
openPanel.canCreateDirectories = false
openPanel.canChooseFiles = true
openPanel.allowedFileTypes = openFileTypes
openPanel.directoryURL = NSURL(fileURLWithPath: "/Users/michaelisbell/Dropbox/___tbx/",isDirectory: false) as URL
let _ = openPanel.urls
let _ = openPanel.runModal()
if let fileurl = openPanel.url {
self.tbxfileURL = fileurl
// if let xmlParserTbx = XMLParserTbx(contentPath: fileurl ) {
// xmlParserTbx.parse()
//
// }
// else {
//
// }
}
}
}