Gio.File::trash

function vfunc_trash(cancellable: Gio.Cancellable): Boolean {
}
  

Sends file to the "Trashcan", if possible. This is similar to deleting it, but the user can recover it before emptying the trashcan. Not all file systems support trashing, so this call can return the Gio.IOErrorEnum.not_supported error.

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.

cancellable

optional Gio.Cancellable object, null to ignore

Returns

true on successful trash, false otherwise.