MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / get_temp_path

Function get_temp_path

autofigure/utils/file_utils.py:72–85  ·  view source on GitHub ↗

Get a temporary file path. Args: suffix: File suffix (e.g., '.svg') prefix: File prefix Returns: Path to a temporary file

(suffix: str = "", prefix: str = "autofigure_")

Source from the content-addressed store, hash-verified

70
71
72def get_temp_path(suffix: str = "", prefix: str = "autofigure_") -> Path:
73 """
74 Get a temporary file path.
75
76 Args:
77 suffix: File suffix (e.g., '.svg')
78 prefix: File prefix
79
80 Returns:
81 Path to a temporary file
82 """
83 fd, path = tempfile.mkstemp(suffix=suffix, prefix=prefix)
84 os.close(fd)
85 return Path(path)
86
87
88def copy_file(src: Union[str, Path], dst: Union[str, Path]) -> bool:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected