Directory.makeTmp

Creates a subdirectory in the preferred directory for temporary files (as returned by g_get_tmp_dir()).

@tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, as the parameter to g_mkstemp(). However, unlike these functions, the template should only be a basename, no directory components are allowed. If template is %NULL, a default template is used.

Note that in contrast to g_mkdtemp() (and mkdtemp()) @tmpl is not modified, and might thus be a read-only literal string.

class Directory
static
string
makeTmp
(
string tmpl
)

Parameters

tmpl string

Template for directory name, as in g_mkdtemp(), basename only, or %NULL for a default template

Return Value

Type: string

The actual name used. This string should be freed with g_free() when not needed any longer and is is in the GLib file name encoding. In case of errors, %NULL is returned and @error will be set.

Throws

GException on failure.

Meta

Since

2.30