MCPcopy Index your code
hub / github.com/python/cpython / chmod

Method chmod

Lib/tarfile.py:2818–2826  ·  view source on GitHub ↗

Set file permissions of targetpath according to tarinfo.

(self, tarinfo, targetpath)

Source from the content-addressed store, hash-verified

2816 raise ExtractError("could not change owner") from e
2817
2818 def chmod(self, tarinfo, targetpath):
2819 """Set file permissions of targetpath according to tarinfo.
2820 """
2821 if tarinfo.mode is None:
2822 return
2823 try:
2824 os.chmod(targetpath, tarinfo.mode)
2825 except OSError as e:
2826 raise ExtractError("could not change mode") from e
2827
2828 def utime(self, tarinfo, targetpath):
2829 """Set modification time of targetpath according to tarinfo.

Callers 13

extractallMethod · 0.95
_extract_memberMethod · 0.95
setup_testbedFunction · 0.45
configure_wasi_pythonFunction · 0.45
_copy_archiveFunction · 0.45
chmod_funcFunction · 0.45
_readlineMethod · 0.45
attachFunction · 0.45
flushMethod · 0.45
buildPythonFunction · 0.45
patchScriptFunction · 0.45

Calls 1

ExtractErrorClass · 0.85

Tested by

no test coverage detected