PyDocs

Nav

File and Directory Access

Path.chmod

pathlib

method of Path (source)
  • Path.chmod(mode, *, follow_symlinks=True)
Change the permissions of the path, like os.chmod().
Changed in 3.10
  • 3.10: The follow_symlinks parameter was added.
1 Example
>>> p = Path('setup.py')
>>> p.stat().st_mode
33277
>>> p.chmod(0o444)
>>> p.stat().st_mode
33060
from the Python docs
See Also
No see-alsos for pathlib/Path.chmod
0 Notes
No notes for Path.chmod