MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / chmod

Method chmod

tools/python-3.11.9-amd64/Lib/tarfile.py:2559–2567  ·  view source on GitHub ↗

Set file permissions of targetpath according to tarinfo.

(self, tarinfo, targetpath)

Source from the content-addressed store, hash-verified

2557 raise ExtractError("could not change owner") from e
2558
2559 def chmod(self, tarinfo, targetpath):
2560 """Set file permissions of targetpath according to tarinfo.
2561 """
2562 if tarinfo.mode is None:
2563 return
2564 try:
2565 os.chmod(targetpath, tarinfo.mode)
2566 except OSError as e:
2567 raise ExtractError("could not change mode") from e
2568
2569 def utime(self, tarinfo, targetpath):
2570 """Set modification time of targetpath according to tarinfo.

Callers 2

extractallMethod · 0.95
_extract_memberMethod · 0.95

Calls 1

ExtractErrorClass · 0.85

Tested by

no test coverage detected