Reputation: 140
NSDictionary * properties = [[NSFileManager defaultManager] attributesOfItemAtPath:myString error:nil];
I need this to work with a NSURL instead of myString.
I'm still new at this.
Upvotes: 0
Views: 298
Reputation: 3414
NSURL *myURL; // assume this is filled with a file:// URL
NSDictionary * properties = [[NSFileManager defaultManager] attributesOfItemAtPath:[myURL path] error:nil];
// Alternatively for example Creation Date
NSDate *creationDate = nil;
BOOL success = [myURL getResourceValue:&creationDate forKey:NSURLCreationDateKey error:NULL]) {
Upvotes: 2