mirror of
https://github.com/python/cpython
synced 2026-09-29 09:25:29 +03:00
Issue #14127: Add ns= parameter to utime, futimes, and lutimes.
Removed futimens as it is now redundant. Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat and ns= parameter to utime--it once again preserves exact metadata on Linux!
This commit is contained in:
parent
3a7f7977f1
commit
76ad59b7e8
6 changed files with 346 additions and 237 deletions
|
|
@ -62,6 +62,10 @@ PyAPI_FUNC(int) _PyTime_ObjectToTime_t(
|
|||
PyAPI_FUNC(PyObject *) _PyLong_FromTime_t(
|
||||
time_t sec);
|
||||
|
||||
/* Convert a PyLong to a time_t. */
|
||||
PyAPI_FUNC(time_t) _PyLong_AsTime_t(
|
||||
PyObject *obj);
|
||||
|
||||
/* Convert a number of seconds, int or float, to a timeval structure.
|
||||
usec is in the range [0; 999999] and rounded towards zero.
|
||||
For example, -1.2 is converted to (-2, 800000). */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue