Method

GioFileInfoget_attribute_as_string

Declaration

char*
g_file_info_get_attribute_as_string (
  GFileInfo* info,
  const char* attribute
)

Description

Gets the value of a attribute, formatted as a string. This escapes things as needed to make the string valid UTF-8.

Parameters

attribute const char*
 

A file attribute key.

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

Return value

Returns: utf8
 

A UTF-8 string associated with the given attribute, or NULL if the attribute wasn’t set. When you’re done with the string it must be freed with g_free().

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.
 The string is a NUL terminated UTF-8 string.