Skip to content

Instantly share code, notes, and snippets.

@typemytype
Created June 25, 2014 12:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save typemytype/4c5140e6d8179e1547fa to your computer and use it in GitHub Desktop.
Save typemytype/4c5140e6d8179e1547fa to your computer and use it in GitHub Desktop.
get file creation and mod date
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