aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/pathlib/_local.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pathlib/_local.py')
-rw-r--r--Lib/pathlib/_local.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/pathlib/_local.py b/Lib/pathlib/_local.py
index a7899717982..ef072b83d96 100644
--- a/Lib/pathlib/_local.py
+++ b/Lib/pathlib/_local.py
@@ -615,6 +615,14 @@ class Path(PathBase, PurePath):
path_str = path_str[:-1]
yield path_str
+ def scandir(self):
+ """Yield os.DirEntry objects of the directory contents.
+
+ The children are yielded in arbitrary order, and the
+ special entries '.' and '..' are not included.
+ """
+ return os.scandir(self)
+
def iterdir(self):
"""Yield path objects of the directory contents.