I am a little confused as I use this piece of code;
NSArray *dirContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Volumes/" error:nil]; int arraysize = sizeof dirContents;
to get an array of the contents of the "Tom" directive, however, when I infer the size of the array, it says that the array has 8 entries, when there are only 4 files in this directory? This will not be a problem, but since I use a for loop as soon as I get,
NSString *volume1 = [dirContents objectAtIndex:4];
(4 - value in the for loop), the application crashes and refuses to start?
Thanks for any help
source share