Gio.File.prototype.set_attribute_byte_string

function set_attribute_byte_string(attribute: String, value: String, flags: Gio.FileQueryInfoFlags, cancellable: Gio.Cancellable): Boolean {
    // Gjs wrapper for g_file_set_attribute_byte_string()
}
  

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

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 string 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.