vertx / io.vertx.kotlin.core.file / io.vertx.core.file.FileSystem

Extensions for io.vertx.core.file.FileSystem

chmodAwait

suspend fun FileSystem.chmodAwait(path: String, perms: String): Unit

Change the permissions on the file represented by path to perms, asynchronously.

chmodRecursiveAwait

suspend fun FileSystem.chmodRecursiveAwait(path: String, perms: String, dirPerms: String): Unit

Change the permissions on the file represented by path to perms, asynchronously. The permission String takes the form rwxr-x--- as specified in {here}.

chownAwait

suspend fun FileSystem.chownAwait(path: String, user: String, group: String): Unit

Change the ownership on the file represented by path to user and {code group}, asynchronously.

copyAwait

suspend fun FileSystem.copyAwait(from: String, to: String): Unit
suspend fun FileSystem.copyAwait(from: String, to: String, options: CopyOptions): Unit

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

copyRecursiveAwait

suspend fun FileSystem.copyRecursiveAwait(from: String, to: String, recursive: Boolean): Unit

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

createFileAwait

suspend fun FileSystem.createFileAwait(path: String): Unit

Creates an empty file with the specified path, asynchronously.

suspend fun FileSystem.createFileAwait(path: String, perms: String): Unit

Creates an empty file with the specified path and permissions perms, asynchronously.

createTempDirectoryAwait

suspend fun FileSystem.createTempDirectoryAwait(prefix: String): String
suspend fun FileSystem.createTempDirectoryAwait(prefix: String, perms: String): String

Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.

suspend fun FileSystem.createTempDirectoryAwait(dir: String, prefix: String, perms: String): String

Creates a new directory in the directory provided by the path path, using the given prefix to generate its name, asynchronously.

createTempFileAwait

suspend fun FileSystem.createTempFileAwait(prefix: String, suffix: String): String

Creates a new file in the default temporary-file directory, using the given prefix and suffix to generate its name, asynchronously.

suspend fun FileSystem.createTempFileAwait(prefix: String, suffix: String, perms: String): String
suspend fun FileSystem.createTempFileAwait(dir: String, prefix: String, suffix: String, perms: String): String

Creates a new file in the directory provided by the path dir, using the given prefix and suffix to generate its name, asynchronously.

deleteAwait

suspend fun FileSystem.deleteAwait(path: String): Unit

Deletes the file represented by the specified path, asynchronously.

deleteRecursiveAwait

suspend fun FileSystem.deleteRecursiveAwait(path: String, recursive: Boolean): Unit

Deletes the file represented by the specified path, asynchronously.

existsAwait

suspend fun FileSystem.existsAwait(path: String): Boolean

Determines whether the file as specified by the path path exists, asynchronously.

fsPropsAwait

suspend fun FileSystem.fsPropsAwait(path: String): FileSystemProps

Returns properties of the file-system being used by the specified path, asynchronously.

linkAwait

suspend fun FileSystem.linkAwait(link: String, existing: String): Unit

Create a hard link on the file system from link to existing, asynchronously.

lpropsAwait

suspend fun FileSystem.lpropsAwait(path: String): FileProps

Obtain properties for the link represented by path, asynchronously.

mkdirAwait

suspend fun FileSystem.mkdirAwait(path: String): Unit
suspend fun FileSystem.mkdirAwait(path: String, perms: String): Unit

Create the directory represented by path, asynchronously.

mkdirsAwait

suspend fun FileSystem.mkdirsAwait(path: String): Unit
suspend fun FileSystem.mkdirsAwait(path: String, perms: String): Unit

Create the directory represented by path and any non existent parents, asynchronously.

moveAwait

suspend fun FileSystem.moveAwait(from: String, to: String): Unit
suspend fun FileSystem.moveAwait(from: String, to: String, options: CopyOptions): Unit

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

openAwait

suspend fun FileSystem.openAwait(path: String, options: OpenOptions): AsyncFile

Open the file represented by path, asynchronously.

propsAwait

suspend fun FileSystem.propsAwait(path: String): FileProps

Obtain properties for the file represented by path, asynchronously.

readDirAwait

suspend fun FileSystem.readDirAwait(path: String): List<String>
suspend fun FileSystem.readDirAwait(path: String, filter: String): List<String>

Read the contents of the directory specified by path, asynchronously.

readFileAwait

suspend fun FileSystem.readFileAwait(path: String): Buffer

Reads the entire file as represented by the path path as a , asynchronously.

readSymlinkAwait

suspend fun FileSystem.readSymlinkAwait(link: String): String

Returns the path representing the file that the symbolic link specified by link points to, asynchronously.

symlinkAwait

suspend fun FileSystem.symlinkAwait(link: String, existing: String): Unit

Create a symbolic link on the file system from link to existing, asynchronously.

truncateAwait

suspend fun FileSystem.truncateAwait(path: String, len: Long): Unit

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

unlinkAwait

suspend fun FileSystem.unlinkAwait(link: String): Unit

Unlinks the link on the file system represented by the path link, asynchronously.

writeFileAwait

suspend fun FileSystem.writeFileAwait(path: String, data: Buffer): Unit

Creates the file, and writes the specified Buffer data to the file represented by the path path, asynchronously.