ID EN
Pathlib

stat

Python 3.11

Return a os.stat_result object containing information about this path, like os.stat(). The result is looked up at each call to this method.

Syntax

PYTHON
Path.stat(*, follow_symlinks=True)

Examples

Example 1
PYTHON
>>> p = Path('setup.py')
>>> p.stat().st_size
956
>>> p.stat().st_mtime
1327883547.852554

See Also

os.stat_result os.stat() lstat()