code

 

#coding=utf8
import time
import os

def fileTime(file):
        l=[time.ctime(os.path.getatime(file)),time.ctime(os.path.getctime(file)),time.ctime(os.path.getmtime(file))]
        return l
print("files!")
times = fileTime("test.bin")
print(times)

print("directory!")
times = fileTime("ui")
print(times)
print(time.ctime(os.stat("test.bin").st_birthtime))

 

posted @ 2019-11-30 15:57  anobscureretreat  阅读(209)  评论(0编辑  收藏  举报