safe_writer_file_path

psi4.driver.safe_writer_file_path(prefix, suffix, warning_context=None)[source]

Build a writer file path and truncate overly long basenames with a hash suffix.

The resulting file basename retains suffix and appends -<hash> before the suffix when truncation is needed.

Return type:

str

Parameters:
  • prefix (str)

  • suffix (str)

  • warning_context (str | None)