zut.files.copymode
- zut.files.copymode(src: str | Path, dst: str | Path, follow_symlinks=True)
Copy the permission bits from src to dst. The file contents, owner, and group are unaffected.
Due to the limitations of Windows, this function only sets/unsets dst FILE_ATTRIBUTE_READ_ONLY flag based on what src attribute is set to.
If follow_symlinks is False and src and dst both refer to symbolic links, the attributes will be read and written on the symbolic links themselves (rather than the files the symbolic links refer to).