Remove a file or directory. Args: path: The path to the file or directory.
(path: str)
| 18 | |
| 19 | |
| 20 | def 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 | |
| 32 | def cp(src: str, dest: str, overwrite: bool = True) -> bool: |