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

Function mkrealdir

tools/python-3.11.9-amd64/Tools/scripts/mkreal.py:30–42  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

28 os.chmod(name, mode)
29
30def mkrealdir(name):
31 st = os.stat(name) # Get the mode
32 mode = S_IMODE(st[ST_MODE])
33 linkto = os.readlink(name)
34 files = os.listdir(name)
35 os.unlink(name)
36 os.mkdir(name, mode)
37 os.chmod(name, mode)
38 linkto = join(os.pardir, linkto)
39 #
40 for filename in files:
41 if filename not in (os.curdir, os.pardir):
42 os.symlink(join(linkto, filename), join(name, filename))
43
44def main():
45 sys.stdout = sys.stderr

Callers 1

mainFunction · 0.85

Calls 8

S_IMODEFunction · 0.85
readlinkMethod · 0.80
listdirMethod · 0.80
joinFunction · 0.50
statMethod · 0.45
unlinkMethod · 0.45
mkdirMethod · 0.45
chmodMethod · 0.45

Tested by

no test coverage detected