Change permissions to the given mode. If mode is an integer it directly encodes the os-specific modes. if rec is True perform recursively.
(self, mode, rec=0)
| 1031 | return self.strpath |
| 1032 | |
| 1033 | def chmod(self, mode, rec=0): |
| 1034 | """Change permissions to the given mode. If mode is an |
| 1035 | integer it directly encodes the os-specific modes. |
| 1036 | if rec is True perform recursively. |
| 1037 | """ |
| 1038 | if not isinstance(mode, int): |
| 1039 | raise TypeError(f"mode {mode!r} must be an integer") |
| 1040 | if rec: |
| 1041 | for x in self.visit(rec=rec): |
| 1042 | error.checked_call(os.chmod, str(x), mode) |
| 1043 | error.checked_call(os.chmod, self.strpath, mode) |
| 1044 | |
| 1045 | def pypkgpath(self): |
| 1046 | """Return the Python package path by looking for the last |