Gio.File.prototype.delete
function delete(cancellable: Gio.Cancellable): Boolean {
// Gjs wrapper for g_file_delete()
}
Deletes a file. If the file is a directory, it will only be deleted if it is empty. This has the same semantics as GLib.unlink.
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 if the file was deleted. false otherwise.