Yield path objects of the directory contents. The children are yielded in arbitrary order, and the special entries '.' and '..' are not included.
(self)
| 827 | return path |
| 828 | |
| 829 | def iterdir(self): |
| 830 | """Yield path objects of the directory contents. |
| 831 | |
| 832 | The children are yielded in arbitrary order, and the |
| 833 | special entries '.' and '..' are not included. |
| 834 | """ |
| 835 | root_dir = str(self) |
| 836 | with os.scandir(root_dir) as scandir_it: |
| 837 | entries = list(scandir_it) |
| 838 | if root_dir == '.': |
| 839 | return (self._from_dir_entry(e, e.name) for e in entries) |
| 840 | else: |
| 841 | return (self._from_dir_entry(e, e.path) for e in entries) |
| 842 | |
| 843 | def glob(self, pattern, *, case_sensitive=None, recurse_symlinks=False): |
| 844 | """Iterate over this subtree and yield all existing files (of any |