iOS Help, how can I get a listing of directories?


macrumors newbie
Original poster
Jan 23, 2012

I would like to build a file browser, where I tell the IPAD to look in this folder and show me the directories and files in it. Any ideas on how I can accomplish this?



macrumors G3
Nov 26, 2007
Unless I'm mistaken, you can't.

Apps in iOS are sandboxed so that they may only access their own directories (and a few select directories that the system allows apps to share amoungst each other, like the camera roll.)


macrumors Pentium
Jan 28, 2009
Quebec, Canada
Look into what iOS's implementation of NSFileManager lets you do :

The NSFileManager class enables you to perform many generic file-system operations and insulates an application from the underlying file system. Most file operations can be performed using the shared file manager object. In iOS and Mac OS X v10.5 and later, you can also create a unique instance of NSFileManager in cases where you want to use a delegate object in conjunction with the file manager.

In Cocoa applications, a file manager object is usually your first interaction with the file system. You use this object to locate, create, copy, and move files and directories. You also use this object to get information about files and directories, such as its size, modification date, and BSD permissions. You can also use a file manager object to change the values of many file and directory attributes.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.