Created
June 25, 2014 12:02
-
-
Save typemytype/4c5140e6d8179e1547fa to your computer and use it in GitHub Desktop.
get file creation and mod date
This file contains hidden or 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
path = u"path/to/file" | |
from AppKit import * | |
fm = NSFileManager.defaultManager() | |
attr, error = fm.attributesOfItemAtPath_error_(path, None) | |
print attr[NSFileCreationDate] | |
print attr[NSFileModificationDate] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment