Improve the g_dir_read_name documentation

This function can return NULL in error cases as well. Document
this, and explain how to discriminate the cases.
https://bugzilla.gnome.org/show_bug.cgi?id=639771
This commit is contained in:
Matthias Clasen 2012-07-05 22:25:49 -04:00
parent f416ece103
commit ab4cc22ba5

View File

@ -190,6 +190,10 @@ g_dir_open (const gchar *path,
* and may vary by file system or other operating-system dependent * and may vary by file system or other operating-system dependent
* factors. * factors.
* *
* %NULL may also be returned in case of errors. On Unix, you can
* check <literal>errno</literal> to find out if %NULL was returned
* because of an error.
*
* On Unix, the '.' and '..' entries are omitted, and the returned * On Unix, the '.' and '..' entries are omitted, and the returned
* name is in the on-disk encoding. * name is in the on-disk encoding.
* *