Python:如何获取文件夹的创建日期和时间?
1 个回答
24
你可以使用 os.stat
这个功能来获取这些信息。
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)