mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
gh-83714: Implement os.statx() function (#139178)
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
27acaf1cb7
commit
fe9ac7fc8c
18 changed files with 1018 additions and 71 deletions
|
|
@ -136,6 +136,8 @@ def _add(str, fn):
|
|||
_add("HAVE_UNLINKAT", "unlink")
|
||||
_add("HAVE_UNLINKAT", "rmdir")
|
||||
_add("HAVE_UTIMENSAT", "utime")
|
||||
if _exists("statx"):
|
||||
_set.add(statx)
|
||||
supports_dir_fd = _set
|
||||
|
||||
_set = set()
|
||||
|
|
@ -157,6 +159,8 @@ def _add(str, fn):
|
|||
_add("HAVE_FPATHCONF", "pathconf")
|
||||
if _exists("statvfs") and _exists("fstatvfs"): # mac os x10.3
|
||||
_add("HAVE_FSTATVFS", "statvfs")
|
||||
if _exists("statx"):
|
||||
_set.add(statx)
|
||||
supports_fd = _set
|
||||
|
||||
_set = set()
|
||||
|
|
@ -195,6 +199,8 @@ def _add(str, fn):
|
|||
_add("HAVE_FSTATAT", "stat")
|
||||
_add("HAVE_UTIMENSAT", "utime")
|
||||
_add("MS_WINDOWS", "stat")
|
||||
if _exists("statx"):
|
||||
_set.add(statx)
|
||||
supports_follow_symlinks = _set
|
||||
|
||||
del _set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue