GH-117727: Speed up `pathlib.Path.iterdir()` by using `os.scandir()` (#117728)
Replace use of `os.listdir()` with `os.scandir()`. Forgo setting `_drv`, `_root` and `_tail_cached`, as these usually aren't needed. Use `os.DirEntry.path` to set `_str`.
B
Barney Gale committed
30f0643e36d2c9a5849c76ca0b27b748448d0567
Parent: 0eb52f5
Committed by GitHub <noreply@github.com>
on 4/12/2024, 10:02:39 PM