new_file_to_archive
- specatalog.data_management.measurement_management.new_file_to_archive(src, ms_id, category, update=False)[source]
Copies a file to the archive measurement directory.
- Parameters:
src (Union[str, Path]) – Source file path to be archived.
ms_id (int) – Measurement ID number.
category (str) – File category (must be one of: raw, scripts, figures, additional_info, literature).
update (bool, optional) – If False, raises error when file exists (default: False).
- Raises:
ValueError – If category is invalid.
FileNotFoundError – If source file doesn’t exist.
FileExistsError – If target file exists and update=False.
- Return type:
None