Gio.File.prototype.set_attribute
function set_attribute(attribute: String, type: Gio.FileAttributeType, value_p: void, flags: Gio.FileQueryInfoFlags, cancellable: Gio.Cancellable): Boolean { // Gjs wrapper for g_file_set_attribute() }
Sets an attribute in the file with attribute name attribute to @value.
Some attributes can be unset by setting attribute to Gio.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.IOErrorEnum.cancelled will be returned.
- attribute
a string containing the attribute's name
- type
The type of the attribute
- value_p
a pointer to the value (or the pointer itself if the type is a pointer type)
- flags
a set of Gio.FileQueryInfoFlags
- cancellable
optional Gio.Cancellable object, null to ignore
- Returns
true if the attribute was set, false otherwise.