开发者

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

开发者 https://www.devze.com 2023-04-10 09:33 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How to get file creation & modification date/times in Python?
This question already has answers here: Closed 11 years ago.

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 p开发者_如何学运维ython?

Thank you


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号