Method
GioFileset_attribute
Declaration
gboolean
g_file_set_attribute (
GFile* file,
const char* attribute,
GFileAttributeType type,
gpointer value_p,
GFileQueryInfoFlags flags,
GCancellable* cancellable,
GError** error
)
Description
Sets an attribute in the file with attribute name attribute
to value_p
.
Some attributes can be unset by setting type
to
G_FILE_ATTRIBUTE_TYPE_INVALID
and value_p
to NULL
.
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. | |
type |
GFileAttributeType |
The type of the attribute. |
|
value_p |
gpointer |
A pointer to the value (or the pointer itself if the type is a pointer type) |
|
The argument can be NULL . | |
The data is owned by the caller of the function. | |
flags |
GFileQueryInfoFlags |
A set of |
|
cancellable |
GCancellable |
Optional |
|
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 . |