g_dir_open (
  const gchar* path,
  guint flags,
  GError** error


Opens a directory for reading. The names of the files in the directory can then be retrieved using g_dir_read_name(). Note that the ordering is not defined.


path const gchar*

The path to the directory you are interested in. On Unix in the on-disk encoding. On Windows in UTF-8

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
flags guint

Currently must be set to 0. Reserved for future use.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: GDir

A newly allocated GDir on success, NULL on failure. If non-NULL, you must free the result with g_dir_close() when you are finished with it.

 The data is owned by the called function.