Так вы получите все файлы из определенной папки. Вы можете заменить NSCachesDirectory
на NSDocumentDirectory
.
- (NSArray *)getAllFilesfromAFolder:(NSString *)folderName
{
NSString *stringPath = nil;
if(folderName)
stringPath = [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)objectAtIndex:0]stringByAppendingPathComponent:folderName];
else
stringPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)objectAtIndex:0];
NSArray *filePathsArray = [[NSFileManager defaultManager] subpathsOfDirectoryAtPath:stringPath error:nil];
return filePathsArray;
}