I have NSMutableArray with music files objects in .mp3 format. All items fetched from document directory. My problem is I am getting .sqlite files along with .mp3 files. I want only .mp3 files from NSMutableArray. I tried with NSPredicate but it giving me error of Incompatible pointer types NSMutableArray/NSArray.(NSMutableArray and NSPredicate filtering)
I don't want files like (projectname.sqlite,projectname.sqlite-shm,projectname.sqlite-val etc)
My code is,
downloadedFilesArray = [[NSMutableArray alloc] init];
fileManger = [NSFileManager defaultManager];
NSError *error;
downloadedFilesArray = [[fileManger contentsOfDirectoryAtPath:fileDest error:&error] mutableCopy];
if([downloadedFilesArray containsObject:@".DS_Store"])
[downloadedFilesArray removeObject:@".DS_Store"];
How to filter files like .mp3,.m3u,.aac??
Thanks