mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 10:57:53 +02:00
Add g_mkdtemp in the spirit of g_mkstemp
At the same time, also add g_mkdtemp_full and g_dir_make_tmp variants. The patch also unifies the unique-name-generating code for all variants of mkstemp and mkdtemp and adds tests for the new functions. Based on patches by Paolo Bonzini, http://bugzilla.gnome.org/show_bug.cgi?id=118563
This commit is contained in:
@@ -99,16 +99,23 @@ gboolean g_file_set_contents (const gchar *filename,
|
||||
gchar *g_file_read_link (const gchar *filename,
|
||||
GError **error);
|
||||
|
||||
/* Wrapper / workalike for mkdtemp() */
|
||||
gchar *g_mkdtemp (gchar *tmpl);
|
||||
gchar *g_mkdtemp_full (gchar *tmpl,
|
||||
gint mode);
|
||||
|
||||
/* Wrapper / workalike for mkstemp() */
|
||||
gint g_mkstemp (gchar *tmpl);
|
||||
gint g_mkstemp_full (gchar *tmpl,
|
||||
int flags,
|
||||
int mode);
|
||||
gint flags,
|
||||
gint mode);
|
||||
|
||||
/* Wrapper for g_mkstemp */
|
||||
/* Wrappers for g_mkstemp and g_mkdtemp() */
|
||||
gint g_file_open_tmp (const gchar *tmpl,
|
||||
gchar **name_used,
|
||||
GError **error);
|
||||
gchar **name_used,
|
||||
GError **error);
|
||||
gchar *g_dir_make_tmp (const gchar *tmpl,
|
||||
GError **error);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
Reference in New Issue
Block a user