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: cocoa-dev@lists.apple.com 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 <p.sand...@alpinesoft.co.uk> 寫道﹕ 寄件人: Paul Sanders <p.sand...@alpinesoft.co.uk> 主題: Re: getting file creation date from NTFS 收件人: "Ken Thomases" <k...@codeweavers.com>, "Angelo Chen" <angelochen...@yahoo.com.hk> 副本(CC): cocoa-dev@lists.apple.com 日期: 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com