Commit 0544fdff authored by Philip Withnall's avatar Philip Withnall

gfileinfo: Clarify docs to say that name and display-name are set

They are always available, for all files.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>

Fixes: #137
parent a84f241d
......@@ -1581,9 +1581,9 @@ g_file_info_get_is_symlink (GFileInfo *info)
* g_file_info_get_name:
* @info: a #GFileInfo.
*
* Gets the name for a file.
* Gets the name for a file. This is guaranteed to always be set.
*
* Returns: (type filename): a string containing the file name.
* Returns: (type filename) (not nullable): a string containing the file name.
**/
const char *
g_file_info_get_name (GFileInfo *info)
......@@ -1604,9 +1604,9 @@ g_file_info_get_name (GFileInfo *info)
* g_file_info_get_display_name:
* @info: a #GFileInfo.
*
* Gets a display name for a file.
* Gets a display name for a file. This is guaranteed to always be set.
*
* Returns: a string containing the display name.
* Returns: (not nullable): a string containing the display name.
**/
const char *
g_file_info_get_display_name (GFileInfo *info)
......
......@@ -108,7 +108,8 @@ typedef struct _GFileInfoClass GFileInfoClass;
*
* A key in the "standard" namespace for getting the name of the file.
* The name is the on-disk filename which may not be in any known encoding,
* and can thus not be generally displayed as is.
* and can thus not be generally displayed as is. It is guaranteed to be set on
* every file.
* Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
* name in a user interface.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
......@@ -119,8 +120,8 @@ typedef struct _GFileInfoClass GFileInfoClass;
* G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
*
* A key in the "standard" namespace for getting the display name of the file.
* A display name is guaranteed to be in UTF8 and can thus be displayed in
* the UI.
* A display name is guaranteed to be in UTF-8 and can thus be displayed in
* the UI. It is guaranteed to be set on every file.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
**/
#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name" /* string */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment