Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: How to get the created date and time of a folder? [duplicate]

Possible Duplicate:
How to get file creation & modification date/times in Python?

I would like to get the created date and time of a folder. Are there anyways to do that in python?

Thank you

like image 551
Ricky Avatar asked Oct 03 '11 06:10

Ricky


1 Answers

You might use os.stat to retrieve this information.

os.stat(path).st_mtime      // time of most recent content modification,
os.stat(path).st_ctime      // platform dependent; time of most recent metadata change on Unix, or the time of creation on Windows)
like image 62
Howard Avatar answered Sep 22 '22 17:09

Howard