5.3.1.21.22.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.12.0'), tmp_directory_prefix: str = 'temp_data_fox_cli_')

Bases: object

Create and reuse a temporary working directory.

check_for_tmp_file(file_path: Path, file_extension: str) → Path | None

Return a cached temporary file path if one already exists.

Parameters:
  • file_path – Source file path used for deterministic cache naming.

  • file_extension – Extension to use for the cached file.

Returns:

Cached file path if present, otherwise None.

static get_hash_name(file_path: Path, file_extension: str) → Path

Generate a deterministic cache filename from an absolute file path.

Parameters:
  • file_path – Source file path used as hash input.

  • file_extension – Extension to append to the generated name.

Returns:

Generated cache filename.