delete_element
- specatalog.data_management.measurement_management.delete_element(base_dir, ms_id, category, filename, save_delete=True)[source]
Delete a file from the archive.
- Parameters:
base_dir (str or Path) – Path to the root-folder of the archive.
ms_id (str or int) – Number of the measurement.
category (str) – One of the categories: [“raw”, “scripts”, “figures”, “additional_info”, “literature”]. The file is deleted from the corresponding subfolder.
filename (str) – Name of the file to be deleted
save_delete (bool, optional) – Ask for confirmation before deletion. The default is True.
- Raises:
ValueError – An error is raised if the category is not one out of the list: [“raw”, “scripts”, “figures”, “additional_info”, “literature”].
FileNotFoundError – An error is raised if the file does not exist.
- Return type:
None.