Created
May 12, 2014 05:36
-
-
Save prologic/0be92b0ce6d6b7fc8091 to your computer and use it in GitHub Desktop.
Changing the modified tiem of a directory on POSIX systems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> 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
See: https://docs.python.org/2/library/os.html#os.utime