<分区>
Possible Duplicate:
python: which file is newer & by how much time
在 python 中——我如何检查——文件是否比其他文件更新?
编辑:
有创建时间和修改时间。
问题应明确说明所需的属性。
修改
os.stat(FILE).st_mtime
os.path.getmtime(FILE)
创作
os.path.getctime(FILE)
和 os.stat(FILE).st_ctime
在类 Unix 操作系统上不提供创建时间。 Link通过 root有关于如何在类 Unix 机器上找出创建时间的解决方案。