os.utime

Christian Heimes lists at cheimes.de
Mon Mar 21 05:43:19 EDT 2011


Am 21.03.2011 03:32, schrieb Dan Stromberg:
> Well, it is, and it's not.  It was originally called "creation time", but
> many today find "change time" a better description of what it actually does,
> sort of retroactively changing what the "c" means.  This is because the
> ctime reflects the change time of an inode, not of the file's content - but
> most people don't really care what an inode is.  Sometimes that's the same
> as the time at which the file was created, but it doesn't necessarily remain
> so throughout the file's lifetime.

You really seemed to know what you are talking about. :)

I'm sorry if I offended you in any way. I had to clarify the meaning of
st_ctime many times in the past because people confused it for the
creation ts of the file.

For instance this confusing has lead to a confusing bug in our code base
a while ago. After I fixed the ownership of a bunch of files, the ctime
was newer than the mtime. A library couldn't handle that and we got
ourself a nice exception.

Christian




More information about the Python-list mailing list