KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I was wondering how to read a file from a specific location on ios. For example I'd quite like to have files of the same name stored in different locations for example. Project/Files/Text/1.txt Project/Files/MoreText/1.txt At the moment I can load files in but I can't see how to specify a specific directory. My program seems to load a file in regardless of where it is meaning I can only have one text file or the other working. I have tried using NSFileManager: NSFileManager *filemanager = [NSFileManager defaultManager]; NSArray *filelist = [filemanager directoryContentsAtPath:@"Text"]; but I later realised that this actually isn't doing anything. It just returns no objects. I've also seen NSBundle but haven't seen an example where a specific file is returned. I need the filenames to be the same for my algorithm which loads the files. Any help would be appreciated.
Tags (comma-separated)
Save Edits
Cancel