To update the modification timestamp (which, for example, is shown at the output of ls -l ) filePath , now:
NSError* error; NSFileManager* fileManager = [NSFileManager defaultManager]; if (![fileManager setAttributes:@{NSFileModificationDate:[NSDate date]} ofItemAtPath:filePath error:&error]) { NSLog(@"Couldn't update modification date: %@", error); }
Ashley
source share