Following my program shows contents of Documents directory and is displayed in a tableView . But the Documents directory contains some directories , some audio , some video , an
Just in case of image file type
-(BOOL)isImageSource:(NSURL*)URL
{
CGImageSourceRef source = CGImageSourceCreateWithURL((__bridge CFURLRef)URL, NULL);
NSString *UTI = (__bridge NSString*)CGImageSourceGetType(source);
CFRelease(source);
CFArrayRef mySourceTypes = CGImageSourceCopyTypeIdentifiers();
NSArray *array = (__bridge NSArray*)mySourceTypes;
CFRelease(mySourceTypes);
return [array containsObject:UTI];
}