• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Set NSFileModificationDate on USB key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Set NSFileModificationDate on USB key


  • Subject: Set NSFileModificationDate on USB key
  • From: Leonardo <email@hidden>
  • Date: Wed, 21 Sep 2011 22:50:37 +0200
  • Thread-topic: Set NSFileModificationDate on USB key

I have a source file with NSFileModificationDate 2011-09-21 20:12:29 +0000
I copy this date to the destination file and I get 2011-09-21 20:12:28 +0000
So, one second earlier. This happens only on a FAT16 USB-key volume. If I do
that on a file on a MacOSX volume I get the same date. Correct. I do:

    scrDict = [mManager attributesOfItemAtPath:srcPath error:nil];
    srcDate = [srcDict objectForKey:NSFileModificationDate];
    dstDict = [NSMutableDictionary dictionaryWithDictionary:
                      [mManager attributesOfItemAtPath:dstPath error:nil]];
    [dstDict setObject:srcDate  forKey:NSFileModificationDate]
    [mManager setAttributes:dstDict ofItemAtPath:dstPath error:nil];

I also tried to just copy the file with copyItemAtPath:...
Same results. Ok on Mac volume, wrong on the USB key.

And I even tried to set the date by the method FSSetCatalogInfo with
kFSCatInfoContentMod. Same results. This has been reported from my clients
too on their own USB keys.

Why doesn't it properly work on a FAT16 USB key? (FAT16 is what Disk Utility
reports, even after a new Erase as MS-DOS (FAT).
Do I miss something?
Is it a bug?
How to workaround this trouble?


Regards
-- Leonardo


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Set NSFileModificationDate on USB key
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Gestalt
  • Next by Date: Re: Does an iOS app's UI freeze when going into background?
  • Previous by thread: Re: Affinity between a document (plain text) file and app-specific parameters for this document
  • Next by thread: Re: Set NSFileModificationDate on USB key
  • Index(es):
    • Date
    • Thread