MCPcopy Create free account
hub / github.com/dot-agent/nextpy / rm

Function rm

nextpy/utils/path_ops.py:20–29  ·  view source on GitHub ↗

Remove a file or directory. Args: path: The path to the file or directory.

(path: str)

Source from the content-addressed store, hash-verified

18
19
20def rm(path: str):
21 """Remove a file or directory.
22
23 Args:
24 path: The path to the file or directory.
25 """
26 if os.path.isdir(path):
27 shutil.rmtree(path)
28 elif os.path.isfile(path):
29 os.remove(path)
30
31
32def cp(src: str, dest: str, overwrite: bool = True) -> bool:

Callers 3

cpFunction · 0.85
mvFunction · 0.85
lnFunction · 0.85

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected