MCPcopy
hub / github.com/treeverse/dvc / remove

Function remove

dvc/utils/fs.py:62–72  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

60
61
62def remove(path):
63 logger.debug("Removing '%s'", path)
64
65 try:
66 if os.path.isdir(path):
67 shutil.rmtree(path, onerror=_chmod)
68 else:
69 _unlink(path, _chmod)
70 except OSError as exc:
71 if exc.errno != errno.ENOENT:
72 raise
73
74
75def path_isin(child: "StrPath", parent: "StrPath") -> bool:

Callers 15

destroyFunction · 0.90
destroyFunction · 0.90
_removeFunction · 0.90
initFunction · 0.90
_applyFunction · 0.90
_reproduce_entryMethod · 0.90
_active_pidMethod · 0.90
cleanupMethod · 0.90
from_stash_entryMethod · 0.90
cleanupMethod · 0.90
_repro_argsMethod · 0.90
test_import_fileMethod · 0.90

Calls 2

_unlinkFunction · 0.85
isdirMethod · 0.80

Tested by 15

test_import_fileMethod · 0.72
test_import_dirMethod · 0.72
testMethod · 0.72
test_pull_00_prefixMethod · 0.72
test_fileMethod · 0.72
test_dirMethod · 0.72
test_fileMethod · 0.72
test_dirMethod · 0.72
test_deletionMethod · 0.72
test_updateMethod · 0.72