Gio.Seekable::truncate_fn
function vfunc_truncate_fn(offset: Number(gint64), cancellable: Gio.Cancellable): Boolean {
}
Truncates a stream with a given #offset.
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. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error.
- offset
a #goffset.
- cancellable
optional Gio.Cancellable object, null to ignore.
- Returns
true if successful. If an error has occurred, this function will return false and set @error appropriately if present.