Reputation: 121
I want to have a file manager inside a window. I have no idea how to do that. I don't really know what to google to figure that out. By file manager, I mean like Finder inside of the window. What would I use to do this? I'm developing for os x mavericks with xcode 5. thanks!
Upvotes: 1
Views: 160
Reputation: 6638
There's no built-in control that would just magically provide a way for the user to browse the file system.
So there's (at least) two fundamental, separate tasks here:
You can start by learning about NSFileManager in the File System Programming Guide or in this nice NSHipster article. Once you've understood how the file system data is represented and retrieved via the appropriate Cocoa APIs it's time to think about how to display them.
You've mentioned The Finder but obviously it has a number of ways to display file system data to the user. (plain/flat lists, drill-down lists, grids, carousel views, stacks, ...)
Assuming you'd want to go with a simple list or browser like interface you could use NSBrowser, NSOutlineView or NSTableView to display the data to the user.
When you hit road blocks along the way it's probably a good idea to post more specific questions here on the site and people will be glad to help you figure out the details!
Upvotes: 3