Comparing creation/modification date of NSData objects
At first I have a plist file in app bundle. At some point the file can get updated (downloaded into Documents Folder). Whats the best way to know which file is newer? The mainbundle plist could get updated with new App Version and then the downloaded one would be the oldest. I do have a timestamp inside the plist but I actually don't want to load each of them into memory to be able to compare the dates, as each takes 1-2 seconds. Is there some kind of creation date that I could compare?
How about this:
NSError *error = nil; NSDictionary* dict = [NSFileManager attributesOfItemAtPath:path error:&error]; NSDate* date = [dict fileModificationDate];