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

They are always available, for all files.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #137
This commit is contained in:
Philip Withnall
2020-07-27 00:45:31 +01:00
parent a84f241dd7
commit 0544fdff5f
2 changed files with 8 additions and 7 deletions

View File

@@ -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 */