vertx / io.vertx.core.file / FileSystem / truncate

truncate

abstract fun truncate(path: String, len: Long, handler: Handler<AsyncResult<Void>>): FileSystem

Truncate the file represented by path to length len in bytes, asynchronously.

The operation will fail if the file does not exist or len is less than zero.

Parameters

path - the path to the file

len - the length to truncate it to

handler - the handler that will be called on completion

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