Skip to content

Commit

Permalink
Add examples illustrating symbolic chmod.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 6, 2023
1 parent d09b7d6 commit 5698f1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions path/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,12 @@ def chmod(self, mode):
Set the mode. May be the new mode (os.chmod behavior) or a `symbolic
mode <http://en.wikipedia.org/wiki/Chmod#Symbolic_modes>`_.
>>> a_file = Path(getfixture('tmp_path')).joinpath('afile.txt').touch()
>>> a_file.chmod(0o700)
Path(...
>>> a_file.chmod('u+x')
Path(...
.. seealso:: :func:`os.chmod`
"""
if isinstance(mode, str):
Expand Down

0 comments on commit 5698f1e

Please sign in to comment.