MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / make_dir_writeable

Function make_dir_writeable

test/common.py:238–248  ·  view source on GitHub ↗
(dirname)

Source from the content-addressed store, hash-verified

236
237
238def make_dir_writeable(dirname):
239 # Some tests make files and subdirectories read-only, so rmtree/unlink will not delete
240 # them. Force-make everything writable in the subdirectory to make it
241 # removable and re-attempt.
242 os.chmod(dirname, 0o777)
243
244 for directory, subdirs, files in os.walk(dirname):
245 for item in files + subdirs:
246 i = os.path.join(directory, item)
247 if not os.path.islink(i):
248 os.chmod(i, 0o777)
249
250
251def force_delete_dir(dirname):

Callers 2

force_delete_dirFunction · 0.85
force_delete_contentsFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected