I want to list the files from a group (a subdirectory) that is in resources. In my application I have a directory named "4x4"; in Xcode I created a group "4x4" into resources and I added all the files of the directory "4x4" to that group. Now, I'm making this:
NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"4x4"];
NSFileManager *fm = [NSFileManager defaultManager];
NSError *error = [[NSError alloc] init];
NSArray *directoryAndFileNames = [fm contentsOfDirectoryAtPath:path error:&error];
It gaves me a null array, and if I check if the directory existes it tells me that it doesn't exist. If I try to list the files of the mainBundle (without the "4x4" group) it gaves me all the files, but I don't want them.
What should I do? Do you have any idea or do you know the right way?
Thanks in advance!