5.1.1.5. get_tmp_filepath¶
-
mfutil.
get_tmp_filepath
(tmp_dir=None, prefix='')[source]¶ Return a tmp (complete) filepath.
The filename is made with get_unique_hexa_identifier() identifier so 32 hexa characters.
The dirname can be provided by the user (or be a system one). He will be created if necessary. An exception can be raised if any problems at this side.
Note: the file is not created or open at all. The function just returns a filename.
Parameters: - tmp_dir (string) – user provided tmp directory (None to use the system temp dir).
- prefix (string) – you can add here a prefix for filenames (will be preprended before the 32 hexa characters).
Returns: (string) tmp (complete) filepath.
Raises: MFUtilException if the temp directory is not good or can’t – be created.