[issue14127] os.stat and os.utime: allow preserving exact metadata
Arfrever Frehtes Taifersar Arahesis
report at bugs.python.org
Sun Mar 4 01:52:29 CET 2012
Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com> added the comment:
The following solution might be compatible with Guido's suggestion:
os.stat(path).st_atime_ns -> nanoseconds_since_epoch_as_int
os.stat(path).st_ctime_ns -> nanoseconds_since_epoch_as_int
os.stat(path).st_mtime_ns -> nanoseconds_since_epoch_as_int
atime = os.stat(path).st_atime_ns
mtime = os.stat(path).st_mtime_ns
os.utime(path, (atime, mtime), resolution="ns")
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14127>
_______________________________________
More information about the Python-bugs-list
mailing list