• 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
getting file creation date from NTFS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting file creation date from NTFS


  • Subject: getting file creation date from NTFS
  • From: Angelo Chen <email@hidden>
  • Date: Sat, 22 May 2010 23:33:11 +0800 (HKT)

Hi,
I'd like to get creation date of a file, here are the codes:
NSDictionary *fileAttributes = [fileManager fileAttributesAtPath:path traverseLink:YES];	NSLog(@"Dict %@", fileAttributes);
This works if the file came from FAT or Mac OS X, but if it is in a NTFS volume, creation date is always wrong, I observe the Finder can display the creation date correctly, any idea how to obtain a creation date for files in NTFS? Thanks,
Angelo
This come from a NTFS:
2010-05-22 23:06:12.276 test1[2531:a0b] Dict {    NSFileCreationDate = "2928613-08-09 15:06:42 +0800";    NSFileExtensionHidden = 0;    NSFileGroupOwnerAccountID = 20;    NSFileGroupOwnerAccountName = staff;    NSFileHFSCreatorCode = 0;    NSFileHFSTypeCode = 0;    NSFileModificationDate = "2004-08-04 12:56:56 +0800";    NSFileOwnerAccountID = 501;    NSFileOwnerAccountName = user1;    NSFilePosixPermissions = 493;    NSFileReferenceCount = 1;    NSFileSize = 69120;    NSFileSystemFileNumber = 2469;    NSFileSystemNumber = 234881027;    NSFileType = NSFileTypeRegular;}
This come from a file in FAT:
2010-05-22 23:09:43.336 test1[2702:a0b] Dict {    NSFileCreationDate = "2009-01-13 22:56:16 +0800";    NSFileExtensionHidden = 0;    NSFileGroupOwnerAccountID = 20;    NSFileGroupOwnerAccountName = staff;    NSFileHFSCreatorCode = 0;    NSFileHFSTypeCode = 0;    NSFileModificationDate = "2008-02-25 04:01:00 +0800";    NSFileOwnerAccountID = 501;    NSFileOwnerAccountName = user1;    NSFilePosixPermissions = 511;    NSFileReferenceCount = 1;    NSFileSize = 13086720;    NSFileSystemFileNumber = 119;    NSFileSystemNumber = 234881031;    NSFileType = NSFileTypeRegular;}




_______________________________________________

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: getting file creation date from NTFS
      • From: Ken Thomases <email@hidden>
    • Re: getting file creation date from NTFS
      • From: "Hank Heijink (Mailinglists)" <email@hidden>
  • Prev by Date: Re: Compatibility of Data iPhone / Mac
  • Next by Date: Re: getting file creation date from NTFS
  • Previous by thread: getting file time stamp from a NTFS volume
  • Next by thread: Re: getting file creation date from NTFS
  • Index(es):
    • Date
    • Thread