remove_path#
- scikitplot.utils._path.remove_path(paths=None, base_path=None)[source]#
Remove unwanted files or directories from a specified base path.
- Parameters:
- pathsList[str], optional
A list of directory or file names to be removed. If these exist in the
base_path, they will be deleted. (default [‘__MACOSX’, ‘bank-additional’]).- base_pathstr, optional
The base directory where the unwanted paths will be removed from. If None, it defaults to the current working directory (cwd).
- Parameters:
- Return type:
None
Notes
It checks if the path exists before trying to remove it.
Uses
shutil.rmtree()for directories andos.remove()for files.Any exceptions raised during removal will be silently ignored.