NSFileManager *fileManager= [[NSFileManager alloc]init];
NSDirectoryEnumerator *myEnumerator= [fileManager enumeratorAtPath:[[theFolder URLByDeletingLastPathComponent]path]];
int f,size=0;
NSMutableArray *dirList=[[NSMutableArray alloc]init];
NSString *fpath;
while (fpath=[myEnumerator nextObject])
{
[dirList addObject:fpath];
}
[dirList sortedArrayUsingSelector:@selector(localizedStandardCompare:)];
dirList 包含像“name_0012345.tif”这样的文件名。尽管进行了排序,但数组不包含我在查找器中按名称排序的顺序中的文件。