简体   繁体   中英

file manager inside a MacOS application window

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!

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:

  • Getting the file system data
  • Displaying the file system data to the user

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM