With Python, to get the creation date of a file, I usually do the following:
import os, time
f = 'myFile.txt'
fileStats = os.stat(f)
time.ctime(fileStats.st_birthtime)
Using PyPy 5.1.1 I just discovered that 'stat_result' object has no attribute 'st_birthtime'
I have checked all the other attributes: posix.stat_result(st_mode=33188, st_ino=4410002, st_dev=16777218, st_nlink=1, st_uid=10825, st_gid=20, st_size=62782, _integer_atime=1466067213, _integer_mtime=1462951964, _integer_ctime=1462951965)
and I was expecting _integer_ctime
to give me the creation date of the file but, instead, it gives the last modification date (almost identical to _integer_mtime
that is supposed to be the actual modification date...) rather than the creation date.
So, how do I get the creation date of a file using PyPy? Also, what exactly is _integer_ctime
then?