Question about getmtime

Sean DiZazzo half.italian at
Fri Feb 19 23:09:56 CET 2010

On Feb 19, 10:06 am, MRAB <pyt... at> wrote:
> Brandon wrote:
> > Hi everyone,
> > Does copying or moving a file affect the return value of
> > os.path.getmtime(path)?
> The modification time of a copied file should be the same as the
> original.
> The creation time of a copied file will be the time at which it was
> copied, so that can result in the paradoxical state of a file having
> been modified _before_ it was created! :-)

ctime does not stand for creation time.  I went through this a couple
of months ago.  It's updated whenever the inode is updated, so
changing permissions, among other things will update it.

It blew me away when I finally found this out.


More information about the Python-list mailing list