[Pythonmac-SIG] file creation dates
Eric Nieuwland
eric.nieuwland at xs4all.nl
Fri Jun 6 21:47:39 EDT 2003
Russell,
Welcome to the wonderful world of UNIX!
Ctime is the last time there was a change to the 'inode'. Inodes are
what a UNIX file system is made of: they are the administrative units
that represent files/directories/... Each time an attribute like atime,
mtime, owner, or group is explicitly changed, ctime changes. Thus, if
you write to a file only mtime changes but if you 'touch' a file (i.e.
manually change mtime) then ctime changes, too.
--eric
On Friday, June 6, 2003, at 08:38 PM, Russell E Owen wrote:
> I've just stumbled across something new to me. In MacPython 2.2.2, the
> st_ctime returned by os.stat was the file creation date. Somehow I had
> the impression that was normal. However, in Mac Python 2.3b1 and in
> unix-on-Mac python 2.2.2 the st_ctime is something else (perhaps the
> "time of last status change", whatever that is, as documented in
> Python in a Nutshell).
>
> It is interesting that the st_ctime can be different than the st_atime
> and st_mtime, even under the unix Python 2.2.2 -- I had no idea the
> HFS+ had so many file date entries. Yikes! (And how could unix be
> missing such an important thing as file creation date? Weird.)
>
> Anyway, I've been using file creation date and am wondering what to do.
>
> Is there a simple standard way to get the file creation date in Mac
> Python 2.3b1, preferably one that also works in MacPython 2.2.2?
>
> -- Russell
>
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
More information about the Pythonmac-SIG
mailing list