5.3.1.24.18.1. cli.helpers.tmp_handler.TmpHandler

class cli.helpers.tmp_handler.TmpHandler(tmp_dir_parent: Path = WindowsPath('C:/Users/foxbms/AppData/Local/fhg-iisb/foxbms/Cache/1.11.0'), tmp_directory_prefix: str = 'temp_data_fox_cli_')

Create and reuse a temporary working directory.

__init__(tmp_dir_parent: Path = WindowsPath('C:/Users/foxbms/AppData/Local/fhg-iisb/foxbms/Cache/1.11.0'), tmp_directory_prefix: str = 'temp_data_fox_cli_') None

Initialize the temporary directory handler.

Parameters:
  • tmp_dir_parent – Parent directory used to create or find temp dirs.

  • tmp_directory_prefix – Prefix used for managed temp directories.

Methods

__init__([tmp_dir_parent, tmp_directory_prefix])

Initialize the temporary directory handler.

check_for_tmp_file(file_path, file_extension)

Return a cached temporary file path if one already exists.

get_hash_name(file_path, file_extension)

Generate a deterministic cache filename from an absolute file path.