Function

GLibmkdir_with_parents

Declaration [src]

gint
g_mkdir_with_parents (
  const gchar* pathname,
  gint mode
)

Description [src]

Create a directory if it doesn’t already exist. Create intermediate parent directories as needed, too.

Available since:2.8

Parameters

pathname const gchar*
 

A pathname in the GLib file name encoding.

 The data is owned by the caller of the function.
 The string is a file system path, using the OS encoding.
mode gint
 

Permissions to use for newly created directories.

Return value

Returns: gint
 

0 if the directory already exists, or was successfully created. Returns -1 if an error occurred, with errno set.