├── FileHider
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── icon_128x128.png
│ │ ├── icon_128x128@2x.png
│ │ ├── icon_16x16.png
│ │ ├── icon_16x16@2x.png
│ │ ├── icon_256x256.png
│ │ ├── icon_256x256@2x.png
│ │ ├── icon_32x32.png
│ │ ├── icon_32x32@2x.png
│ │ ├── icon_512x512.png
│ │ └── icon_512x512@2x.png
│ └── Contents.json
├── Base.lproj
│ └── Main.storyboard
├── DragDestinationView.swift
├── Info.plist
├── ViewController.swift
├── fileCellView.swift
├── myNSSplitView.swift
└── windowController.swift
├── Invisibility cloak.entitlements
├── Invisibility cloak.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── Chih-Hao.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── Chih-Hao.xcuserdatad
│ └── xcschemes
│ ├── FileHider.xcscheme
│ └── xcschememanagement.plist
└── README.md
/FileHider/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // FileHider
4 | //
5 | // Created by Chih-Hao on 2018/1/11.
6 | // Copyright © 2018年 Chih-Hao. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | @NSApplicationMain
12 | class AppDelegate: NSObject, NSApplicationDelegate {
13 |
14 | func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
15 | return true
16 | }
17 |
18 | func applicationDidFinishLaunching(_ aNotification: Notification) {
19 | // Insert code here to initialize your application
20 |
21 |
22 | }
23 |
24 | func applicationWillTerminate(_ aNotification: Notification) {
25 | // Insert code here to tear down your application
26 | }
27 |
28 |
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "icon_16x16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "icon_16x16@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "icon_32x32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "icon_32x32@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "icon_128x128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "icon_128x128@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "icon_256x256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "icon_256x256@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "icon_512x512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "icon_512x512@2x.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_128x128.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_16x16.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_256x256.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_32x32.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_512x512.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/FileHider/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png
--------------------------------------------------------------------------------
/FileHider/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/FileHider/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
242 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
--------------------------------------------------------------------------------
/FileHider/DragDestinationView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DragDestinationView.swift
3 | // FileHider
4 | //
5 | // Created by Chih-Hao on 2018/1/22.
6 | // Copyright © 2018年 Chih-Hao. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | protocol FileDragDelegate : class{
12 |
13 | func didFinishDrag(_ filePath:String)
14 |
15 | }
16 |
17 | class DragDestinationView: NSView {
18 |
19 | weak var delegate: FileDragDelegate?
20 |
21 | override func awakeFromNib() {
22 | super.awakeFromNib()
23 | self.register(forDraggedTypes: [NSFilenamesPboardType])
24 | }
25 |
26 | override func draggingEntered(_ sender: NSDraggingInfo) -> NSDragOperation {
27 | let sourceDragMask = sender.draggingSourceOperationMask()
28 | let pboard = sender.draggingPasteboard()
29 | let dragTypes = pboard.types! as NSArray
30 | if dragTypes.contains(NSFilenamesPboardType) {
31 | if sourceDragMask.contains([.link]) {
32 | return .link
33 | }
34 | if sourceDragMask.contains([.copy]) {
35 | return .copy
36 | }
37 | }
38 | return .generic
39 | }
40 |
41 |
42 | override func performDragOperation(_ sender: NSDraggingInfo?)-> Bool {
43 | let pboard = sender?.draggingPasteboard()
44 | let dragTypes = pboard!.types! as NSArray
45 | if dragTypes.contains(NSFilenamesPboardType) {
46 | let files = (pboard?.propertyList(forType: NSFilenamesPboardType))! as! Array
47 | let numberOfFiles = files.count
48 | if numberOfFiles > 0 {
49 | let filePath = files[0] as String
50 | //代理通知
51 | if let delegate = self.delegate {
52 | NSLog("filePath \(filePath)")
53 | delegate.didFinishDrag(filePath)
54 | }
55 | }
56 | }
57 | return true
58 | }
59 |
60 |
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/FileHider/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 5
23 | LSApplicationCategoryType
24 | public.app-category.utilities
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2018年 Chih-Hao. All rights reserved.
29 | NSMainStoryboardFile
30 | Main
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/FileHider/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // FileHider
4 | //
5 | // Created by Chih-Hao on 2018/1/11.
6 | // Copyright © 2018年 Chih-Hao. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | class ViewController: NSViewController {
12 |
13 | @IBOutlet weak var dragView: DragDestinationView!
14 | @IBOutlet weak var tableview: NSTableView!
15 | @IBOutlet var infoTextView: NSTextView!
16 | @IBOutlet var fileName: NSTextField!
17 |
18 | @IBOutlet var toggleButton: NSSegmentedControl!
19 |
20 | @IBOutlet var fileImage: NSImageView!
21 |
22 | var isHidden : [String] = []
23 | var filesList : [URL] = []
24 |
25 | @IBAction func deleteRow(_ sender: Any) {
26 | if tableview.selectedRow >= 0 {
27 | filesList.remove(at: tableview.selectedRow)
28 | self.isHidden.remove(at: tableview.selectedRow)
29 | tableview.reloadData()
30 |
31 | infoTextView.string = ""
32 | fileImage.image = nil
33 | fileName.stringValue = ""
34 | toggleButton.isHidden = true
35 | }
36 |
37 | }
38 |
39 |
40 | var selectedItem : URL? {
41 | didSet {
42 | guard let selectedUrl = selectedItem else {
43 | return
44 | }
45 |
46 | infoTextView.string = ""
47 |
48 | fileImage.image = NSWorkspace.shared().icon(forFile: selectedUrl.path)
49 |
50 | let infoString = infoAbout(url: selectedUrl)
51 | if !infoString.isEmpty {
52 | let formattedText = formatInfoText(infoString)
53 | infoTextView.textStorage?.setAttributedString(formattedText)
54 | }
55 |
56 | }
57 |
58 | }
59 |
60 | @IBOutlet weak var splitView: NSSplitView!
61 |
62 | var selectedFolder: URL? {
63 | didSet {
64 | if let selectedFolder = selectedFolder{
65 | filesList.append(selectedFolder)
66 | self.isHidden.append("false")
67 | self.tableview.reloadData()
68 | self.tableview.scrollRowToVisible(0)
69 | }
70 | }
71 |
72 | }
73 |
74 | @IBAction func onOffToggle(_ sender: Any) {
75 | var path: String = ""
76 |
77 | if let len = selectedItem?.pathComponents.count{
78 | for i in 1...len-2{
79 | path += "/" + (selectedItem?.pathComponents[i])!
80 | }
81 | }
82 |
83 | var i = -1
84 | for var index in 0.. String {
193 | let fileManager = FileManager.default
194 |
195 | do {
196 | let attributes = try fileManager.attributesOfItem(atPath: url.path)
197 | var report: [String] = ["\(url.path)", ""]
198 |
199 | for (key, value) in attributes {
200 | // ignore NSFileExtendedAttributes as it is a messy dictionary
201 | if key.rawValue == "NSFileExtendedAttributes" { continue }
202 | report.append("\(key.rawValue):\t \(value)")
203 | }
204 | return report.joined(separator: "\n")
205 | } catch {
206 | return "No information available for \(url.path)"
207 | }
208 | }
209 |
210 | func formatInfoText(_ text: String) -> NSAttributedString {
211 | let paragraphStyle = NSMutableParagraphStyle.default().mutableCopy() as? NSMutableParagraphStyle
212 | paragraphStyle?.minimumLineHeight = 24
213 | paragraphStyle?.alignment = .left
214 | paragraphStyle?.tabStops = [ NSTextTab(type: .leftTabStopType, location: 240) ]
215 |
216 | let textAttributes: [String: Any] = [
217 | NSFontAttributeName: NSFont.systemFont(ofSize: 14),
218 | NSParagraphStyleAttributeName: paragraphStyle ?? NSParagraphStyle.default()
219 | ]
220 |
221 | let formattedText = NSAttributedString(string: text, attributes: textAttributes)
222 | return formattedText
223 | }
224 | }
225 |
226 |
227 |
228 | extension ViewController: NSTableViewDelegate,NSTableViewDataSource{
229 |
230 | func numberOfRows(in tableView: NSTableView) -> Int {
231 | return filesList.count
232 | }
233 |
234 | func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
235 |
236 | let item = filesList[row]
237 |
238 |
239 | let fileIcon = NSWorkspace.shared().icon(forFile: item.path)
240 |
241 |
242 | if let cell = tableView.make(withIdentifier: "FileCell", owner: nil)
243 | as? fileCellView {
244 |
245 | cell.myFileNameText?.stringValue = item.lastPathComponent
246 | cell.myimageview?.image = fileIcon
247 | return cell
248 | }
249 |
250 | return nil
251 | }
252 |
253 | func tableViewSelectionDidChange(_ notification: Notification) {
254 | if tableview.selectedRow < 0 {
255 | selectedItem = nil
256 | return
257 | }
258 |
259 | selectedItem = filesList[tableview.selectedRow]
260 |
261 | fileName.stringValue = (selectedItem?.lastPathComponent)!
262 |
263 | toggleButton.isHidden = false
264 |
265 | if(tableview.selectedRow < self.isHidden.count && self.isHidden[tableview.selectedRow] == "true"){
266 | toggleButton.selectedSegment = 1
267 | }else{
268 | toggleButton.selectedSegment = 0
269 | }
270 | }
271 |
272 |
273 | }
274 |
275 | extension ViewController: FileDragDelegate {
276 | func didFinishDrag(_ filePath:String) {
277 | let url = NSURL(fileURLWithPath: filePath)
278 |
279 | print("---")
280 | var path: String = ""
281 |
282 | if let len = url.pathComponents?.count{
283 | for i in 1...len-2{
284 | path += "/" + (url.pathComponents![i])
285 | }
286 | }
287 |
288 | print(path+"/"+(url.lastPathComponent)!)
289 |
290 | saveBookmarks(path+"/"+(url.lastPathComponent)!)
291 | filesList.append(url as URL)
292 | self.isHidden.append("false")
293 | tableview.reloadData()
294 |
295 | }
296 |
297 | func saveBookmarks(_ filePath : String){
298 | print("save=====")
299 |
300 |
301 | let userDefault = UserDefaults.standard
302 | let folderPath = NSURL(fileURLWithPath: filePath)
303 | print(folderPath.absoluteString!)
304 | do {
305 | let bookmark = try folderPath.bookmarkData(options: .securityScopeAllowOnlyReadAccess, includingResourceValuesForKeys: nil, relativeTo: nil)
306 | userDefault.set(bookmark, forKey: folderPath.absoluteString!)
307 | } catch let error as NSError {
308 | print("Set Bookmark Fails: \(error.description)")
309 | }
310 | }
311 |
312 | func readBookmarks(_ filePath : String){
313 | print("read=====")
314 | print(filePath)
315 | let userDefault = UserDefaults.standard
316 | if let bookmarkData = userDefault.object(forKey: filePath) as? NSData {
317 | do {
318 | let url = try NSURL.init(resolvingBookmarkData: bookmarkData as Data, options: .withoutUI, relativeTo: nil, bookmarkDataIsStale: nil)
319 | url.startAccessingSecurityScopedResource()
320 | } catch let error as NSError {
321 | print("Bookmark Access Fails: \(error.description)")
322 | }
323 | }
324 | }
325 |
326 |
327 | }
328 |
329 |
--------------------------------------------------------------------------------
/FileHider/fileCellView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // fileCellView.swift
3 | // FileHider
4 | //
5 | // Created by Chih-Hao on 2018/1/12.
6 | // Copyright © 2018年 Chih-Hao. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | class fileCellView: NSTableCellView {
12 |
13 | @IBOutlet weak var myimageview: NSImageView!
14 |
15 | @IBOutlet weak var myFileNameText: NSTextField!
16 |
17 |
18 | override func draw(_ dirtyRect: NSRect) {
19 | super.draw(dirtyRect)
20 |
21 | // Drawing code here.
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/FileHider/myNSSplitView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // myNSSplitView.swift
3 | // FileHider
4 | //
5 | // Created by Chih-Hao on 2018/1/12.
6 | // Copyright © 2018年 Chih-Hao. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | class myNSSplitView: NSSplitView {
12 |
13 | override var dividerThickness:CGFloat{
14 | get {return 0.5}
15 | }
16 |
17 | override func draw(_ dirtyRect: NSRect) {
18 | super.draw(dirtyRect)
19 |
20 |
21 | // Drawing code here.
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/FileHider/windowController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // windowController.swift
3 | // FileHider
4 | //
5 | // Created by Chih-Hao on 2018/1/12.
6 | // Copyright © 2018年 Chih-Hao. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | class windowController: NSWindowController {
12 |
13 |
14 | override func windowDidLoad() {
15 | super.windowDidLoad()
16 |
17 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/Invisibility cloak.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-write
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Invisibility cloak.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | CE16CA0A2007157300F680B1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16CA092007157300F680B1 /* AppDelegate.swift */; };
11 | CE16CA0C2007157300F680B1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16CA0B2007157300F680B1 /* ViewController.swift */; };
12 | CE16CA0E2007157300F680B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE16CA0D2007157300F680B1 /* Assets.xcassets */; };
13 | CE16CA112007157300F680B1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE16CA0F2007157300F680B1 /* Main.storyboard */; };
14 | CE16CA1B2008E0D500F680B1 /* fileCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16CA1A2008E0D500F680B1 /* fileCellView.swift */; };
15 | CE16CA1D2008E62900F680B1 /* windowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16CA1C2008E62900F680B1 /* windowController.swift */; };
16 | CE16CA1F2008E77200F680B1 /* myNSSplitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16CA1E2008E77200F680B1 /* myNSSplitView.swift */; };
17 | CEDFACA0201605DE00592862 /* DragDestinationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDFAC9F201605DE00592862 /* DragDestinationView.swift */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXFileReference section */
21 | CE14257C2125C08C00980087 /* Invisibility cloak.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Invisibility cloak.entitlements"; sourceTree = ""; };
22 | CE16CA062007157300F680B1 /* Invisibility cloak.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Invisibility cloak.app"; sourceTree = BUILT_PRODUCTS_DIR; };
23 | CE16CA092007157300F680B1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
24 | CE16CA0B2007157300F680B1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
25 | CE16CA0D2007157300F680B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
26 | CE16CA102007157300F680B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
27 | CE16CA122007157300F680B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
28 | CE16CA1A2008E0D500F680B1 /* fileCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = fileCellView.swift; sourceTree = ""; };
29 | CE16CA1C2008E62900F680B1 /* windowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = windowController.swift; sourceTree = ""; };
30 | CE16CA1E2008E77200F680B1 /* myNSSplitView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = myNSSplitView.swift; sourceTree = ""; };
31 | CEDFAC9F201605DE00592862 /* DragDestinationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DragDestinationView.swift; sourceTree = ""; };
32 | /* End PBXFileReference section */
33 |
34 | /* Begin PBXFrameworksBuildPhase section */
35 | CE16CA032007157300F680B1 /* Frameworks */ = {
36 | isa = PBXFrameworksBuildPhase;
37 | buildActionMask = 2147483647;
38 | files = (
39 | );
40 | runOnlyForDeploymentPostprocessing = 0;
41 | };
42 | /* End PBXFrameworksBuildPhase section */
43 |
44 | /* Begin PBXGroup section */
45 | CE16C9FD2007157300F680B1 = {
46 | isa = PBXGroup;
47 | children = (
48 | CE14257C2125C08C00980087 /* Invisibility cloak.entitlements */,
49 | CE16CA082007157300F680B1 /* FileHider */,
50 | CE16CA072007157300F680B1 /* Products */,
51 | );
52 | sourceTree = "";
53 | };
54 | CE16CA072007157300F680B1 /* Products */ = {
55 | isa = PBXGroup;
56 | children = (
57 | CE16CA062007157300F680B1 /* Invisibility cloak.app */,
58 | );
59 | name = Products;
60 | sourceTree = "";
61 | };
62 | CE16CA082007157300F680B1 /* FileHider */ = {
63 | isa = PBXGroup;
64 | children = (
65 | CE16CA092007157300F680B1 /* AppDelegate.swift */,
66 | CE16CA0B2007157300F680B1 /* ViewController.swift */,
67 | CE16CA0D2007157300F680B1 /* Assets.xcassets */,
68 | CE16CA0F2007157300F680B1 /* Main.storyboard */,
69 | CE16CA122007157300F680B1 /* Info.plist */,
70 | CE16CA1A2008E0D500F680B1 /* fileCellView.swift */,
71 | CE16CA1C2008E62900F680B1 /* windowController.swift */,
72 | CE16CA1E2008E77200F680B1 /* myNSSplitView.swift */,
73 | CEDFAC9F201605DE00592862 /* DragDestinationView.swift */,
74 | );
75 | path = FileHider;
76 | sourceTree = "";
77 | };
78 | /* End PBXGroup section */
79 |
80 | /* Begin PBXNativeTarget section */
81 | CE16CA052007157300F680B1 /* Invisibility cloak */ = {
82 | isa = PBXNativeTarget;
83 | buildConfigurationList = CE16CA152007157300F680B1 /* Build configuration list for PBXNativeTarget "Invisibility cloak" */;
84 | buildPhases = (
85 | CE16CA022007157300F680B1 /* Sources */,
86 | CE16CA032007157300F680B1 /* Frameworks */,
87 | CE16CA042007157300F680B1 /* Resources */,
88 | );
89 | buildRules = (
90 | );
91 | dependencies = (
92 | );
93 | name = "Invisibility cloak";
94 | productName = FileHider;
95 | productReference = CE16CA062007157300F680B1 /* Invisibility cloak.app */;
96 | productType = "com.apple.product-type.application";
97 | };
98 | /* End PBXNativeTarget section */
99 |
100 | /* Begin PBXProject section */
101 | CE16C9FE2007157300F680B1 /* Project object */ = {
102 | isa = PBXProject;
103 | attributes = {
104 | LastSwiftUpdateCheck = 0830;
105 | LastUpgradeCheck = 0830;
106 | ORGANIZATIONNAME = "Chih-Hao";
107 | TargetAttributes = {
108 | CE16CA052007157300F680B1 = {
109 | CreatedOnToolsVersion = 8.3;
110 | DevelopmentTeam = P48TU896KM;
111 | ProvisioningStyle = Automatic;
112 | SystemCapabilities = {
113 | com.apple.Sandbox = {
114 | enabled = 1;
115 | };
116 | };
117 | };
118 | };
119 | };
120 | buildConfigurationList = CE16CA012007157300F680B1 /* Build configuration list for PBXProject "Invisibility cloak" */;
121 | compatibilityVersion = "Xcode 3.2";
122 | developmentRegion = English;
123 | hasScannedForEncodings = 0;
124 | knownRegions = (
125 | en,
126 | Base,
127 | );
128 | mainGroup = CE16C9FD2007157300F680B1;
129 | productRefGroup = CE16CA072007157300F680B1 /* Products */;
130 | projectDirPath = "";
131 | projectRoot = "";
132 | targets = (
133 | CE16CA052007157300F680B1 /* Invisibility cloak */,
134 | );
135 | };
136 | /* End PBXProject section */
137 |
138 | /* Begin PBXResourcesBuildPhase section */
139 | CE16CA042007157300F680B1 /* Resources */ = {
140 | isa = PBXResourcesBuildPhase;
141 | buildActionMask = 2147483647;
142 | files = (
143 | CE16CA0E2007157300F680B1 /* Assets.xcassets in Resources */,
144 | CE16CA112007157300F680B1 /* Main.storyboard in Resources */,
145 | );
146 | runOnlyForDeploymentPostprocessing = 0;
147 | };
148 | /* End PBXResourcesBuildPhase section */
149 |
150 | /* Begin PBXSourcesBuildPhase section */
151 | CE16CA022007157300F680B1 /* Sources */ = {
152 | isa = PBXSourcesBuildPhase;
153 | buildActionMask = 2147483647;
154 | files = (
155 | CE16CA1B2008E0D500F680B1 /* fileCellView.swift in Sources */,
156 | CEDFACA0201605DE00592862 /* DragDestinationView.swift in Sources */,
157 | CE16CA1D2008E62900F680B1 /* windowController.swift in Sources */,
158 | CE16CA0C2007157300F680B1 /* ViewController.swift in Sources */,
159 | CE16CA0A2007157300F680B1 /* AppDelegate.swift in Sources */,
160 | CE16CA1F2008E77200F680B1 /* myNSSplitView.swift in Sources */,
161 | );
162 | runOnlyForDeploymentPostprocessing = 0;
163 | };
164 | /* End PBXSourcesBuildPhase section */
165 |
166 | /* Begin PBXVariantGroup section */
167 | CE16CA0F2007157300F680B1 /* Main.storyboard */ = {
168 | isa = PBXVariantGroup;
169 | children = (
170 | CE16CA102007157300F680B1 /* Base */,
171 | );
172 | name = Main.storyboard;
173 | sourceTree = "";
174 | };
175 | /* End PBXVariantGroup section */
176 |
177 | /* Begin XCBuildConfiguration section */
178 | CE16CA132007157300F680B1 /* Debug */ = {
179 | isa = XCBuildConfiguration;
180 | buildSettings = {
181 | ALWAYS_SEARCH_USER_PATHS = NO;
182 | CLANG_ANALYZER_NONNULL = YES;
183 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
184 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
185 | CLANG_CXX_LIBRARY = "libc++";
186 | CLANG_ENABLE_MODULES = YES;
187 | CLANG_ENABLE_OBJC_ARC = YES;
188 | CLANG_WARN_BOOL_CONVERSION = YES;
189 | CLANG_WARN_CONSTANT_CONVERSION = YES;
190 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
191 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
192 | CLANG_WARN_EMPTY_BODY = YES;
193 | CLANG_WARN_ENUM_CONVERSION = YES;
194 | CLANG_WARN_INFINITE_RECURSION = YES;
195 | CLANG_WARN_INT_CONVERSION = YES;
196 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
197 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
198 | CLANG_WARN_UNREACHABLE_CODE = YES;
199 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
200 | CODE_SIGN_IDENTITY = "-";
201 | COPY_PHASE_STRIP = NO;
202 | DEBUG_INFORMATION_FORMAT = dwarf;
203 | ENABLE_STRICT_OBJC_MSGSEND = YES;
204 | ENABLE_TESTABILITY = YES;
205 | GCC_C_LANGUAGE_STANDARD = gnu99;
206 | GCC_DYNAMIC_NO_PIC = NO;
207 | GCC_NO_COMMON_BLOCKS = YES;
208 | GCC_OPTIMIZATION_LEVEL = 0;
209 | GCC_PREPROCESSOR_DEFINITIONS = (
210 | "DEBUG=1",
211 | "$(inherited)",
212 | );
213 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
214 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
215 | GCC_WARN_UNDECLARED_SELECTOR = YES;
216 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
217 | GCC_WARN_UNUSED_FUNCTION = YES;
218 | GCC_WARN_UNUSED_VARIABLE = YES;
219 | MACOSX_DEPLOYMENT_TARGET = 10.13;
220 | MTL_ENABLE_DEBUG_INFO = YES;
221 | ONLY_ACTIVE_ARCH = YES;
222 | SDKROOT = macosx;
223 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
224 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
225 | };
226 | name = Debug;
227 | };
228 | CE16CA142007157300F680B1 /* Release */ = {
229 | isa = XCBuildConfiguration;
230 | buildSettings = {
231 | ALWAYS_SEARCH_USER_PATHS = NO;
232 | CLANG_ANALYZER_NONNULL = YES;
233 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
234 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
235 | CLANG_CXX_LIBRARY = "libc++";
236 | CLANG_ENABLE_MODULES = YES;
237 | CLANG_ENABLE_OBJC_ARC = YES;
238 | CLANG_WARN_BOOL_CONVERSION = YES;
239 | CLANG_WARN_CONSTANT_CONVERSION = YES;
240 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
241 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
242 | CLANG_WARN_EMPTY_BODY = YES;
243 | CLANG_WARN_ENUM_CONVERSION = YES;
244 | CLANG_WARN_INFINITE_RECURSION = YES;
245 | CLANG_WARN_INT_CONVERSION = YES;
246 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
247 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
248 | CLANG_WARN_UNREACHABLE_CODE = YES;
249 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
250 | CODE_SIGN_IDENTITY = "-";
251 | COPY_PHASE_STRIP = NO;
252 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
253 | ENABLE_NS_ASSERTIONS = NO;
254 | ENABLE_STRICT_OBJC_MSGSEND = YES;
255 | GCC_C_LANGUAGE_STANDARD = gnu99;
256 | GCC_NO_COMMON_BLOCKS = YES;
257 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
258 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
259 | GCC_WARN_UNDECLARED_SELECTOR = YES;
260 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
261 | GCC_WARN_UNUSED_FUNCTION = YES;
262 | GCC_WARN_UNUSED_VARIABLE = YES;
263 | MACOSX_DEPLOYMENT_TARGET = 10.13;
264 | MTL_ENABLE_DEBUG_INFO = NO;
265 | SDKROOT = macosx;
266 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
267 | };
268 | name = Release;
269 | };
270 | CE16CA162007157300F680B1 /* Debug */ = {
271 | isa = XCBuildConfiguration;
272 | buildSettings = {
273 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
274 | CODE_SIGN_ENTITLEMENTS = "Invisibility cloak.entitlements";
275 | CODE_SIGN_IDENTITY = "Mac Developer";
276 | CODE_SIGN_STYLE = Automatic;
277 | COMBINE_HIDPI_IMAGES = YES;
278 | DEVELOPMENT_TEAM = P48TU896KM;
279 | INFOPLIST_FILE = FileHider/Info.plist;
280 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
281 | MACOSX_DEPLOYMENT_TARGET = 10.10;
282 | PRODUCT_BUNDLE_IDENTIFIER = zhihao.fudan.fileHider;
283 | PRODUCT_NAME = "$(TARGET_NAME)";
284 | PROVISIONING_PROFILE_SPECIFIER = "";
285 | SWIFT_VERSION = 3.0;
286 | };
287 | name = Debug;
288 | };
289 | CE16CA172007157300F680B1 /* Release */ = {
290 | isa = XCBuildConfiguration;
291 | buildSettings = {
292 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
293 | CODE_SIGN_ENTITLEMENTS = "Invisibility cloak.entitlements";
294 | CODE_SIGN_IDENTITY = "Mac Developer";
295 | CODE_SIGN_STYLE = Automatic;
296 | COMBINE_HIDPI_IMAGES = YES;
297 | DEVELOPMENT_TEAM = P48TU896KM;
298 | INFOPLIST_FILE = FileHider/Info.plist;
299 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
300 | MACOSX_DEPLOYMENT_TARGET = 10.10;
301 | PRODUCT_BUNDLE_IDENTIFIER = zhihao.fudan.fileHider;
302 | PRODUCT_NAME = "$(TARGET_NAME)";
303 | PROVISIONING_PROFILE_SPECIFIER = "";
304 | SWIFT_VERSION = 3.0;
305 | };
306 | name = Release;
307 | };
308 | /* End XCBuildConfiguration section */
309 |
310 | /* Begin XCConfigurationList section */
311 | CE16CA012007157300F680B1 /* Build configuration list for PBXProject "Invisibility cloak" */ = {
312 | isa = XCConfigurationList;
313 | buildConfigurations = (
314 | CE16CA132007157300F680B1 /* Debug */,
315 | CE16CA142007157300F680B1 /* Release */,
316 | );
317 | defaultConfigurationIsVisible = 0;
318 | defaultConfigurationName = Release;
319 | };
320 | CE16CA152007157300F680B1 /* Build configuration list for PBXNativeTarget "Invisibility cloak" */ = {
321 | isa = XCConfigurationList;
322 | buildConfigurations = (
323 | CE16CA162007157300F680B1 /* Debug */,
324 | CE16CA172007157300F680B1 /* Release */,
325 | );
326 | defaultConfigurationIsVisible = 0;
327 | defaultConfigurationName = Release;
328 | };
329 | /* End XCConfigurationList section */
330 | };
331 | rootObject = CE16C9FE2007157300F680B1 /* Project object */;
332 | }
333 |
--------------------------------------------------------------------------------
/Invisibility cloak.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Invisibility cloak.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Invisibility cloak.xcodeproj/project.xcworkspace/xcuserdata/Chih-Hao.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhihaozhang/FileHider-for-mac/01465cad9a1f597bb5508d7e55fa2d2422cfe89c/Invisibility cloak.xcodeproj/project.xcworkspace/xcuserdata/Chih-Hao.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Invisibility cloak.xcodeproj/xcuserdata/Chih-Hao.xcuserdatad/xcschemes/FileHider.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/Invisibility cloak.xcodeproj/xcuserdata/Chih-Hao.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | FileHider.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | CE16CA052007157300F680B1
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AVHider for mac OS X
2 | ~~AVHider~~ oh NO,FileHider是一款将你的文件夹或文件隐藏起来的效率小软件,适用于**macOS X 10.10及以后的macOS版本**。Mac App Store有售,售价为12元,如果这款软件帮助到了您,请从App Store购买一份支持一下我。
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | # 软件异常情况的处理方法
15 |
16 | 如果软件不能正常工作,选择隐藏后仅仅是变灰,尝试在terminal 终端分别运行下面两行命令:
17 |
18 | defaults write com.apple.finder AppleShowAllFiles -bool false
19 |
20 | killall Finder
21 |
22 | # 为什么开发这款软件
23 |
24 | 开发这款软件的**初衷**是~~将xxx.mp4/xxx.avi/xxx.mkv在白天藏起来,免得被别人发现。~~ 在Apple store上发现了一款类似的软件,售价163元,而且卖的不错。我觉得这东西一天就可以搞出来,于是就花了一晚上做了一个非常类似的软件,并将这个应用开源了。
25 |
26 | **对实现细节感兴趣的朋友可以参考[我的博客](http://zhihaozhang.github.io/2018/01/16/FileHider/)**,欢迎fork项目,并贡献您的code。
27 |
28 |
29 | 软件demo url: https://ws1.sinaimg.cn/large/aa2320a8ly1fnhbezm45wg20hs0dc7q5
30 |
31 | 
32 |
33 | ==========2018-1-22更新==========
34 |
35 | Now you just need drag & drop, it's that easy!
36 |
37 | 
38 |
39 | # License
40 |
41 | **MIT**
42 |
43 | # 致谢
44 |
45 | Specially thanks to ~~un~~famous Designer **Joseph**, who designed the exquisite logo for this Application!
46 |
47 | 
48 |
49 | Thanks To **Secret Folder**! 感谢给了我做FileHider所带来的启发和动力。
50 |
51 | 
52 |
--------------------------------------------------------------------------------