Skip to content

Instantly share code, notes, and snippets.

@prologic
Created May 12, 2014 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prologic/0be92b0ce6d6b7fc8091 to your computer and use it in GitHub Desktop.
Save prologic/0be92b0ce6d6b7fc8091 to your computer and use it in GitHub Desktop.
Changing the modified tiem of a directory on POSIX systems
>>> from os import mkdir
>>> from os.path import getmtime
>>> mkdir("foo")
>>> getmtime("foo")
1399872726.0
>>> from os import utime
>>> utime("foo", None)
>>> getmtime("foo")
1399872755.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment