5.1.1.2. create_tmp_dirpath

mfutil.create_tmp_dirpath(tmp_dir=None, prefix='')[source]

Create and return a temporary directory inside a father tempory directory.

The dirname is made with get_unique_hexa_identifier() identifier so 32 hexa characters.

The father 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 temporary directory is created.

Parameters
  • tmp_dir (string) – user provided tmp directory (None to use the system temp dir).

  • prefix (string) – you can add here a prefix for dirnames (will be preprended before the 32 hexa characters).

Returns

(string) complete path of a newly created temporary directory.

Raises

MFUtilException if the temp directory can't be created.