clean_tmp#
- uniharmony.datasets.clean_tmp(tmp_dir_name: str = 'datalad_cache') None#
Remove a temporary DataLad cache folder.
This function deletes the specified folder from the system temporary directory, including all its contents (files, subdirectories, and DataLad metadata).
- Parameters:
- tmp_dir_namestr, default “datalad_cache”
Name of the temporary directory to remove.
- Raises:
- FileNotFoundError
If the temporary directory does not exist.
- PermissionError
If the process lacks permission to delete the directory.
Examples
>>> clean_tmp_folder("datalad_cache") INFO Removed temporary cache: /tmp/datalad_cache
>>> clean_tmp_folder("my_custom_cache") INFO Removed temporary cache: /tmp/my_custom_cache