Kaydet (Commit) 7508a54c authored tarafından Stéphane Wirtel's avatar Stéphane Wirtel Kaydeden (comit) Julien Palard

bpo-20709: os.utime(path_to_directory): wrong documentation for Windows. (GH-5469)

Remove the paragraph where we explain that os.utime() does not support a
directory as path under Windows. Patch by Jan-Philip Gehrcke
Co-authored-by: 's avatarJan-Philip Gehrcke <jgehrcke@gmail.com>
üst 335a6026
...@@ -2768,14 +2768,12 @@ features: ...@@ -2768,14 +2768,12 @@ features:
It is an error to specify tuples for both *times* and *ns*. It is an error to specify tuples for both *times* and *ns*.
Whether a directory can be given for *path* Note that the exact times you set here may not be returned by a subsequent
depends on whether the operating system implements directories as files :func:`~os.stat` call, depending on the resolution with which your operating
(for example, Windows does not). Note that the exact times you set here may system records access and modification times; see :func:`~os.stat`. The best
not be returned by a subsequent :func:`~os.stat` call, depending on the way to preserve exact times is to use the *st_atime_ns* and *st_mtime_ns*
resolution with which your operating system records access and modification fields from the :func:`os.stat` result object with the *ns* parameter to
times; see :func:`~os.stat`. The best way to preserve exact times is to `utime`.
use the *st_atime_ns* and *st_mtime_ns* fields from the :func:`os.stat`
result object with the *ns* parameter to `utime`.
This function can support :ref:`specifying a file descriptor <path_fd>`, This function can support :ref:`specifying a file descriptor <path_fd>`,
:ref:`paths relative to directory descriptors <dir_fd>` and :ref:`not :ref:`paths relative to directory descriptors <dir_fd>` and :ref:`not
......
Remove the paragraph where we explain that os.utime() does not support a
directory as path under Windows. Patch by Jan-Philip Gehrcke
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment