MCPcopy
hub / github.com/deadc0de6/dotdrop / clean

Function clean

tests/helpers.py:50–59  ·  view source on GitHub ↗

Delete file or directory

(path)

Source from the content-addressed store, hash-verified

48
49
50def clean(path):
51 """Delete file or directory"""
52 if not os.path.exists(path):
53 return
54 if os.path.islink(path):
55 os.remove(path)
56 elif os.path.isdir(path):
57 shutil.rmtree(path)
58 else:
59 os.remove(path)
60
61
62def get_string(length):

Callers 1

test_updateMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_updateMethod · 0.72