Method

GioFileset_attribute_string

Declaration

gboolean
g_file_set_attribute_string (
  GFile* file,
  const char* attribute,
  const char* value,
  GFileQueryInfoFlags flags,
  GCancellable* cancellable,
  GError** error
)

Description

Sets attribute of type G_FILE_ATTRIBUTE_TYPE_STRING to value. If attribute is of a different type, this operation will fail.

If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

Parameters

attribute const char*
 

A string containing the attribute’s name.

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

A string containing the attribute’s value.

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

GFileQueryInfoFlags.

cancellable GCancellable
 

Optional GCancellable object, NULL to ignore.

 The argument can be NULL.
 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if the attribute was successfully set, FALSE otherwise.