os.chflags(path, flags, *, follow_symlinks=True)

Set the flags of path to the numeric flags. flags may take a combination (bitwise OR) of the following values (as defined in the stat module):

This function can support not following symlinks.

Raises an auditing event os.chflags with arguments path, flags.

Availability: Unix.

New in version 3.3: The follow_symlinks argument.

Changed in version 3.6: Accepts a path-like object.

Related Reading

os — Miscellaneous operating system interfaces