tempfile¶
Temporary file and directory creation, similar to Python's tempfile module.
Functions¶
tempfile.gettempdir() -> str¶
Return the name of the directory used for temporary files.
Similar to Python's tempfile.gettempdir().
Returns: The path to the system temporary directory, without a trailing separator.
tempfile.mkdtemp(prefix: str = "tmp") -> str¶
Create a temporary directory and return its absolute pathname.
Similar to Python's tempfile.mkdtemp().
Parameters:
prefix(str) -- Prefix for the directory name. Defaults to "tmp".
Returns: The absolute path of the created temporary directory.
Raises:
OSError-- Thrown if the directory could not be created.