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

Method utime

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

Set modification time of targetpath according to tarinfo.

(self, tarinfo, targetpath)

Source from the content-addressed store, hash-verified

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.
2571 """
2572 mtime = tarinfo.mtime
2573 if mtime is None:
2574 return
2575 if not hasattr(os, 'utime'):
2576 return
2577 try:
2578 os.utime(targetpath, (mtime, mtime))
2579 except OSError as e:
2580 raise ExtractError("could not change modification time") from e
2581
2582 #--------------------------------------------------------------------------
2583 def next(self):

Callers 11

extractallMethod · 0.95
_extract_memberMethod · 0.95
touchMethod · 0.80
addMethod · 0.80
__setitem__Method · 0.80
copy_fileFunction · 0.80
runMethod · 0.80
copy_fileFunction · 0.80
untar_fileFunction · 0.80
fixFunction · 0.80
mainFunction · 0.80

Calls 1

ExtractErrorClass · 0.85

Tested by

no test coverage detected