move

open fun move(destination: File, flags: FileCopyFlags, cancellable: Cancellable? = null, progressCallback: FileProgressCallback): <Error class: unknown class><Boolean>

Tries to move the file or directory @source to the location specified by @destination. If native move operations are supported then this is used, otherwise a copy + delete fallback is used. The native implementation may support moving directories (for instance on moves inside the same filesystem), but the fallback code does not.

If the flag %G_FILE_COPY_OVERWRITE is specified an already existing @destination file is overwritten.

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.

If @progress_callback is not null, then the operation can be monitored by setting this to a #GFileProgressCallback function.

Return

true on successful move, false otherwise.

Parameters

destination

#GFile pointing to the destination location

flags

set of #GFileCopyFlags

cancellable

optional #GCancellable object, null to ignore

progressCallback

#GFileProgressCallback function for updates