remove#
- remove(path: str | CloudPath | Path) None[source]#
Deletes a file or a directory (recursively) using
shutil.rmtreeoros.remove.- Parameters:
path (AnyPathStrType) – Path to be removed
Example
>>> path_to_remove = 'D:/path/to/remove' # Could also be a file >>> remove(path_to_remove) path_to_remove deleted