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
attribute | a string containing the attribute's name |
type | The type of the attribute |
valueP | a pointer to the value (or the pointer itself if the type is a pointer type) |
flags | a set of #GFileQueryInfoFlags |
cancellable | optional #GCancellable object, null to ignore |
Returns
true if the attribute was set, false otherwise.
Throws
[ErrorWrap]