FileT.setAttribute

Sets an attribute in the file with attribute name attribute to value_p.

Some attributes can be unset by setting type to gio.types.FileAttributeType.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 gio.types.IOErrorEnum.Cancelled will be returned.

Parameters

attribute string

a string containing the attribute's name

type gio.types.FileAttributeType

The type of the attribute

valueP void*

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

flags gio.types.FileQueryInfoFlags

a set of #GFileQueryInfoFlags

cancellable gio.cancellable.Cancellable

optional #GCancellable object, null to ignore

Return Value

Type: bool

true if the attribute was set, false otherwise.