File.setAttribute

Sets an attribute in the file with attribute name attribute to value. 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 string

a string containing the attribute's name.

type GFileAttributeType

The type of the attribute

valueP void*

a pointer to the value (or the pointer itself if the type is a pointer type)

flags GFileQueryInfoFlags

a set of GFileQueryInfoFlags.

cancellable Cancellable

optional GCancellable object, NULL to ignore. [allow-none]

Return Value

Type: int

TRUE if the attribute was set, FALSE otherwise.

Throws

GException on failure.

Meta