From 5698f1e471aa345362ab92735fd8c052ac275468 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Jul 2023 12:03:09 -0400 Subject: [PATCH] Add examples illustrating symbolic chmod. --- path/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/path/__init__.py b/path/__init__.py index ff26745e..2cfa0961 100644 --- a/path/__init__.py +++ b/path/__init__.py @@ -1105,6 +1105,12 @@ def chmod(self, mode): Set the mode. May be the new mode (os.chmod behavior) or a `symbolic mode `_. + >>> 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):