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

Re: getting file creation date from NTFS


  • Subject: Re: getting file creation date from NTFS
  • From: "Paul Sanders" <email@hidden>
  • Date: Sun, 23 May 2010 10:19:33 +0100

Assuming that these figures come from stat (man -S 2 stat for details), it should be in something called st_birthtime.  st_atime refers to the last time the file was accessed. So, either call stat yourself or, better perhaps, go via the file manager:

http://developer.apple.com/mac/library/DOCUMENTATION/Carbon/Reference/File_Manager/Reference/reference.html

I would also fire up Windows to see what values it reports for the file(s) in question.  Note that viewing the properties for a file in Windows Explorer updates the last access time (!).  Like HFS, file dates on NTFS volumes are stored in UTC.  These are converted to local time by the Finder / Windows Explorer before display but I observe some differences depending on the date being reported (i.e. whether or not DST was in effect on that date).

Looking at a few of my own files (on Windows), the creation date doesn't seem to be very reliable.  I have several files where it post-dates the last modification date.

Paul Sanders.

----- Original Message -----
From: Angelo Chen
To: Ken Thomases ; Paul Sanders
Cc: email@hidden
Sent: Sunday, May 23, 2010 3:05 AM
Subject: Re: getting file creation date from NTFS


      As suggested by Ken, I tried FSMegaInfo on NOTEPAD.EXE in a bootcamp volume:
      if I compared it with Finder's display, Finder listed March 30, 2010 6:48PM as 'Created'
      looks like, st_atime is the creation date?


      'NOTEPAD.EXE'
          st_dev     = 0x0e000003 (major=14, minor=3, disk0s3)
          st_ino     = 2469
          st_mode    = 0x000081ed (-rwxr-xr-x)
          st_nlink   = 1
          st_uid     = 501 (user1)
          st_gid     = 20 (staff)
          st_rdev    = 0x00000000 (major=0, minor=0, console)
          st_atime   = 1269957274.686875000 (Tue Mar 30 13:54:34 2010)
          st_mtime   = 1091595416.0 (Wed Aug  4 04:56:56 2004)
          st_ctime   = 1274540319.708286000 (Sat May 22 14:58:39 2010)
          st_size    = 69120 (67 KB)
          st_blocks  = 136
          st_blksize = 33554432
          st_flags   = 0x00000000
          st_gen     = 0



      --- 2010年5月23日 星期日,Paul Sanders <email@hidden> 寫道﹕


        寄件人: Paul Sanders <email@hidden>
        主題: Re: getting file creation date from NTFS
        收件人: "Ken Thomases" <email@hidden>, "Angelo Chen" <email@hidden>
        副本(CC): email@hidden
        日期: 2010年5月23日,星期日,上午1:14


        > Also be aware that not all file systems support the notion of
        > creation dates of their objects.  I don't know off-hand if
        > NTFS does.

        It does.

        Paul Sanders.






_______________________________________________

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>
References: 
 >Re: getting file creation date from NTFS (From: Angelo Chen <email@hidden>)

  • Prev by Date: nsprogressindicator change color
  • Next by Date: Re: getting file creation date from NTFS
  • Previous by thread: Re: getting file creation date from NTFS
  • Next by thread: Re: getting file creation date from NTFS
  • Index(es):
    • Date
    • Thread