MCPcopy Create free account
hub / github.com/culvertsoft/mgen / rmFolderContents

Function rmFolderContents

buildutil.py:39–47  ·  view source on GitHub ↗
(folder)

Source from the content-addressed store, hash-verified

37 os.chmod(file_path, st.st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
38
39def rmFolderContents(folder):
40 if os.path.exists(folder):
41 for the_file in os.listdir(folder):
42 file_path = os.path.join(folder, the_file)
43 if os.path.exists(file_path):
44 if os.path.isfile(file_path):
45 rmFile(file_path)
46 else:
47 rmFolder(file_path)
48
49def rmFile(path):
50 if os.path.exists(path):

Callers 1

installFunction · 0.85

Calls 2

rmFileFunction · 0.85
rmFolderFunction · 0.85

Tested by

no test coverage detected