import os, time
for i in [(time.strftime('%Y/%m/%d %H:%M:%S', time.localtime(os.path.getatime(name))), '<DIR>' if os.path.isdir(name) else ' ', str(os.path.getsize(name)).rjust(4), name) for name in os.listdir('.')]: print(str(i).strip('(').strip(')'))
Sign in to make a reply
此岸心理咨询
import os, time
for i in [(time.strftime('%Y/%m/%d %H:%M:%S', time.localtime(os.path.getatime(name))), '<DIR>' if os.path.isdir(name) else ' ', str(os.path.getsize(name)).rjust(4), name) for name in os.listdir('.')]: print(str(i).strip('(').strip(')'))