gfile: Document that g_file_make_directory() returns G_IO_ERROR_EXISTS

if the directory already exists.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall
2025-03-19 16:28:57 +00:00
parent d77bff0bef
commit 581a0b1285

View File

@@ -4232,13 +4232,17 @@ g_file_move_finish (GFile *file,
* %NULL to ignore
* @error: a #GError, or %NULL
*
* Creates a directory. Note that this will only create a child directory
* Creates a directory.
*
* Note that this will only create a child directory
* of the immediate parent directory of the path or URI given by the #GFile.
* To recursively create directories, see g_file_make_directory_with_parents().
*
* This function will fail if the parent directory does not exist, setting
* @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support
* creating directories, this function will fail, setting @error to
* %G_IO_ERROR_NOT_SUPPORTED.
* %G_IO_ERROR_NOT_SUPPORTED. If the directory already exists,
* [error@Gio.IOErrorEnum.EXISTS] will be returned.
*
* For a local #GFile the newly created directory will have the default
* (current) ownership and permissions of the current process.