• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by App Bot


30 Nov, 2024

Updated at 12 Dec, 2024

Failure when setting file modificationDate

I properly copy a scrFile to a dstFile with mManager = [NSFileManager defaultManager]; [mManager copyItemAtPath:srcPath toPath:dstPath error:&error]; but on "some destination disks" the dstFile gets a modificationDate with truncated milliseconds. For instance, with this format "yyyy.MM.dd - HH:mm:ss:SSS" I visualize srcDate = 2024.11.03 - 12:42:35:772 dstDate = 2024.11.03 - 12:42:35:000 After the copyItemAtPath I even unsuccessfully tried to set the dstFile modificationDate this way NSMutableDictionary *dstAttrs = [NSMutableDictionary dictionaryWithDictionary:[mManager attributesOfItemAt...