vertx / io.vertx.core.file / FileSystem / copy

copy

abstract fun copy(from: String, to: String, handler: Handler<AsyncResult<Void>>): FileSystem

Copy a file from the path from to path to, asynchronously.

The copy will fail if the destination already exists.

Parameters

from - the path to copy from

to - the path to copy to

handler - the handler that will be called on completion

Return
a reference to this, so the API can be used fluently

abstract fun copy(from: String, to: String, options: CopyOptions, handler: Handler<AsyncResult<Void>>): FileSystem

Copy a file from the path from to path to, asynchronously.

Parameters

from - the path to copy from

to - the path to copy to

options - options describing how the file should be copied

handler - the handler that will be called on completion

Return
a reference to this, so the API can be used fluently