mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
GH-127381: pathlib ABCs: remove PathBase.lstat()
(#127382)
Remove the `PathBase.lstat()` method, which is a trivial variation of `stat()`. No user-facing changes because the pathlib ABCs are still private.
This commit is contained in:
parent
15d6506d17
commit
38264a060a
4 changed files with 26 additions and 29 deletions
|
@ -542,6 +542,13 @@ class Path(PathBase, PurePath):
|
|||
"""
|
||||
return os.stat(self, follow_symlinks=follow_symlinks)
|
||||
|
||||
def lstat(self):
|
||||
"""
|
||||
Like stat(), except if the path points to a symlink, the symlink's
|
||||
status information is returned, rather than its target's.
|
||||
"""
|
||||
return os.lstat(self)
|
||||
|
||||
def exists(self, *, follow_symlinks=True):
|
||||
"""
|
||||
Whether this path exists.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue