Function
GLibmkdtemp_full
since: 2.30
Declaration [src]
gchar*
g_mkdtemp_full (
gchar* tmpl,
gint mode
)
Description [src]
Creates a temporary directory. See the mkdtemp() documentation
on most UNIX-like systems.
The parameter is a string that should follow the rules for
mkdtemp() templates, i.e. contain the string “XXXXXX”.
g_mkdtemp_full() is slightly more flexible than mkdtemp() in that the
sequence does not have to occur at the very end of the template
and you can pass a mode. The X string will be modified to form
the name of a directory that didn’t exist. The string should be
in the GLib file name encoding. Most importantly, on Windows it
should be in UTF-8.
If you are going to be creating a temporary directory inside the
directory returned by g_get_tmp_dir(), you might want to use
g_dir_make_tmp() instead.
Available since: 2.30
This function is not directly available to language bindings.
Parameters
tmpl-
Type:
gchar*Template directory name.
The data is owned by the caller of the function. The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows. mode-
Type:
gintPermissions to create the temporary directory with.
Return value
Type: gchar*
A pointer to tmpl, which has been
modified to hold the directory name. In case of errors, NULL is
returned, and %errno will be set.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |
The return value can be NULL. |
| The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows. |