- (void) createFileList;
- (void) insertPath: (NSMutableArray *) components forParent: (FileListNode *) parent fileSize: (uint64_t) size
index: (NSInteger) index flatList: (NSMutableArray *) flatFileList;
+- (void) sortFileList: (NSMutableArray *) fileNodes;
- (void) completenessChange: (NSDictionary *) statusInfo;
- (void) ratioLimitHit;
}
}
+ [self sortFileList: fileList];
+ [self sortFileList: flatFileList];
+
fFileList = [[NSArray alloc] initWithArray: fileList];
fFlatFileList = [[NSArray alloc] initWithArray: flatFileList];
}
}
}
+- (void) sortFileList: (NSMutableArray *) fileNodes
+{
+ NSSortDescriptor * descriptor = [[[NSSortDescriptor alloc] initWithKey: @"name" ascending: YES
+ selector: @selector(compareFinder:)] autorelease];
+ [fileNodes sortUsingDescriptors: [NSArray arrayWithObject: descriptor]];
+
+ for (FileListNode * node in fileNodes)
+ if ([node isFolder])
+ [self sortFileList: [node children]];
+}
+
//status has been retained
- (void) completenessChange: (NSDictionary *) statusInfo
{