First you need to access the package path of your application:
NSMutableString* bundlePath = [NSMutableString stringWithCapacity:4]; [bundlePath appendString:[[NSBundle mainBundle] bundlePath]];
Now add your folder name in bundlePath
[bundlePath appendString:@"/MyFolder"]; NSArray *directoryContent = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:bundlePath error:nil]; int numberOfFileInFolder = [directoryContent count];
Jhaliya
source share