Gio.File.prototype.set_attribute_int32

function set_attribute_int32(attribute: String, value: Number(gint32), flags: Gio.FileQueryInfoFlags, cancellable: Gio.Cancellable): Boolean {
    // Gjs wrapper for g_file_set_attribute_int32()
}
  

Sets attribute of type Gio.FileAttributeType.int32 to value. If attribute is of a different type, this operation will fail.

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

value

a #gint32 containing the attribute's new value

flags

a Gio.FileQueryInfoFlags

cancellable

optional Gio.Cancellable object, null to ignore

Returns

true if the attribute was successfully set to value in the file, false otherwise.