mutapath.MutaPath.chmod

MutaPath.chmod(mode)[source]

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(...

See also

os.chmod()