I am using the following code to get creation date of a file at a given path and it works fine.
NSDictionary* attrs = [fm attributesOfItemAtPath:@"/Users/me/Desktop/ios" error:nil];
if (attrs != nil) {
NSDate *date = (NSDate*)[attrs objectForKey: NSFileCreationDate];
NSLog(@"Date Created: %@", [date description]);
}
else {
NSLog(@"Not found");
}
Now I want to get the names and creation dates of all files in a folder given at a path.How can I do that? Can anybody help me?
first get list of all files from your directory & then loop until all file completes