diff options
Diffstat (limited to 'Lib/pathlib/_local.py')
-rw-r--r-- | Lib/pathlib/_local.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/pathlib/_local.py b/Lib/pathlib/_local.py index b27f456..25c1e3f 100644 --- a/Lib/pathlib/_local.py +++ b/Lib/pathlib/_local.py @@ -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. |