FileT.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 g_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 G_IO_ERROR_CANCELLED will be returned.

template FileT(TStruct)
bool
delete_

Parameters

cancellable Cancellable

optional gio.Cancellable object, NULL to ignore

Return Value

Type: bool

TRUE if the file was deleted. FALSE otherwise.

Throws

GException on failure.