ctdclient.model.fileupdater module¶
- class ctdclient.model.fileupdater.UpdateFiles(file_path, file_dir, station_event_info)[source]¶
Bases:
objectUses a station log to restrospectively set metadata header and file name.
- Parameters:
file_path (
str|Path) – The path to the file to editfile_dir (
str|Path) – The directory of the filestation_event_info (
str) – The station information of the last CTD cast
- find_all_files()[source]¶
Gets the files to update from the target directory.
Assures, that all possible files, like .hex, .cnv. .xmlcon, .bl, .hdr, .ros or .btl are treated equally.
- Return type:
list[Path]
- rename_files(file_list, new_name)[source]¶
Applies the new file name to all target files.
- Parameters:
file_list (
list[Path]) – The list of target files to renamenew_name (
str) – The new name