MCPcopy Create free account
hub / github.com/Vector35/debugger / remove_dir

Function remove_dir

scripts/build.py:16–23  ·  view source on GitHub ↗
(path: os.PathLike)

Source from the content-addressed store, hash-verified

14
15
16def remove_dir(path: os.PathLike):
17 if sys.platform == 'win32':
18 # Windows being Windows. Not doing this as a recursive delete from the shell will yield
19 # "access denied" errors. Even deleting the individual files from the terminal does this.
20 # Somehow, deleting this way works correctly.
21 subprocess.call(f'rmdir /S /Q "{path}"', shell=True)
22 else:
23 shutil.rmtree(path)
24
25
26if sys.platform.startswith("win"):

Callers 1

build.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected