File.setAttribute

bool setAttribute(string attribute, gio.types.FileAttributeType type, void * valueP, gio.types.FileQueryInfoFlags flags, gio.cancellable.Cancellable cancellable = null)

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

attributea string containing the attribute's name
typeThe type of the attribute
valuePa pointer to the value (or the pointer itself if the type is a pointer type)
flagsa set of #GFileQueryInfoFlags
cancellableoptional #GCancellable object, null to ignore

Returns

true if the attribute was set, false otherwise.

Throws

[ErrorWrap]