tags:

views:

20

answers:

2

Hi, Is there a way to populate the data in a table view with the filenames from a certain folder? Thanks.

A: 

NSFileManager's documentation has a section under Tasks called 'Discovering Directory Contents'. Use these methods to get the contents of a directory and then populate your data source for the table view with the results.

You can use that data to display the directory contents in the table view.

Jasarien
Thanks for your answer!
ibeitia
A: 

This is the code I used (for anyone that may need it):

NSString *bundleRoot = [[NSBundle mainBundle] bundlePath];
NSArray *dirContents = [[NSFileManager defaultManager] directoryContentsAtPath:bundleRoot];
ibeitia