This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin python os.stat gives wrong ctime


On 2016-05-30 03:39, Corinna Vinschen wrote:
On May 28 21:39, Mitch Deoudes wrote:
Cygwin's ctime is Change time, not Birth time, that's why Cygwin's stat
structure comes with an additional st_birthtime as on the BSDs.

I have no idea if python has a compile time option to make st_birthtime
visible, though.

It already is:

$ python
Python 2.7.10 (default, Jun  1 2015, 18:17:45)
[GCC 4.9.2] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> st = os.stat('python.cygport')
>>> print(st)
posix.stat_result(st_mode=33188, st_ino=281474978441936, st_dev=3300977488, st_nlink=1, st_uid=197608, st_gid=197121, st_size=3535, st_atime=1363164377, st_mtime=1464116088, st_ctime=1464116088)
>>> print(st.st_birthtime)
1391923515.0

--
Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]