cpython/Lib/pathlib
Barney Gale 718ab66299
GH-125413: Add pathlib.Path.info attribute (#127730)
Add `pathlib.Path.info` attribute, which stores an object implementing the `pathlib.types.PathInfo` protocol (also new). The object supports querying the file type and internally caching `os.stat()` results. Path objects generated by `Path.iterdir()` are initialised with status information from `os.DirEntry` objects, which is gleaned from scanning the parent directory.

The `PathInfo` protocol has four methods: `exists()`, `is_dir()`, `is_file()` and `is_symlink()`.
2025-02-08 01:16:45 +00:00
..
__init__.py GH-127807: pathlib ABCs: remove PathBase._unsupported_msg() (#127855) 2024-12-12 17:39:24 +00:00
_abc.py GH-125413: Add pathlib.Path.info attribute (#127730) 2025-02-08 01:16:45 +00:00
_local.py GH-125413: Add pathlib.Path.info attribute (#127730) 2025-02-08 01:16:45 +00:00
_os.py GH-125413: Add pathlib.Path.info attribute (#127730) 2025-02-08 01:16:45 +00:00
types.py GH-125413: Add pathlib.Path.info attribute (#127730) 2025-02-08 01:16:45 +00:00