open class FileSystem
Contains a broad set of operations for manipulating files on the file system.
A (potential) blocking and non blocking version of each operation is provided.
The non blocking versions take a handler which is called when the operation completes or an error occurs.
The blocking versions are named xxxBlocking and return the results, or throw exceptions directly. In many cases, depending on the operating system and file system some of the potentially blocking operations can return quickly, which is why we provide them, but it's highly recommended that you test how long they take to return in your particular application before using them on an event loop.
Please consult the documentation for more information on file system support.
NOTE: This class has been automatically generated from the io.vertx.core.file.FileSystem non RX-ified interface using Vert.x codegen.
FileSystem(delegate: FileSystem) |
static val __TYPE_ARG: TypeArg<FileSystem> |
open fun chmod(path: String, perms: String, handler: Handler<AsyncResult<Void>>): FileSystem
Change the permissions on the file represented by The permission String takes the form rwxr-x--- as specified here. |
|
open fun chmodBlocking(path: String, perms: String): FileSystem
Blocking version of io.vertx.rxjava.core.file.FileSystem |
|
open fun chmodRecursive(path: String, perms: String, dirPerms: String, handler: Handler<AsyncResult<Void>>): FileSystem
Change the permissions on the file represented by The permission String takes the form rwxr-x--- as specified in {here}. If the file is directory then all contents will also have their permissions changed recursively. Any directory permissions will be set to |
|
open fun chmodRecursiveBlocking(path: String, perms: String, dirPerms: String): FileSystem
Blocking version of |
|
open fun chown(path: String, user: String, group: String, handler: Handler<AsyncResult<Void>>): FileSystem
Change the ownership on the file represented by |
|
open fun chownBlocking(path: String, user: String, group: String): FileSystem
Blocking version of |
|
open fun copy(from: String, to: String, handler: Handler<AsyncResult<Void>>): FileSystem
Copy a file from the path The copy will fail if the destination already exists. open fun copy(from: String, to: String, options: CopyOptions, handler: Handler<AsyncResult<Void>>): FileSystem
Copy a file from the path |
|
open fun copyBlocking(from: String, to: String): FileSystem
Blocking version of |
|
open fun copyRecursive(from: String, to: String, recursive: Boolean, handler: Handler<AsyncResult<Void>>): FileSystem
Copy a file from the path If The copy will fail if the destination if the destination already exists. |
|
open fun copyRecursiveBlocking(from: String, to: String, recursive: Boolean): FileSystem
Blocking version of |
|
open fun createFile(path: String, handler: Handler<AsyncResult<Void>>): FileSystem
Creates an empty file with the specified open fun createFile(path: String, perms: String, handler: Handler<AsyncResult<Void>>): FileSystem
Creates an empty file with the specified |
|
open fun createFileBlocking(path: String): FileSystemopen fun createFileBlocking(path: String, perms: String): FileSystem
Blocking version of |
|
open fun delete(path: String, handler: Handler<AsyncResult<Void>>): FileSystem
Deletes the file represented by the specified |
|
open fun deleteBlocking(path: String): FileSystem
Blocking version of |
|
open fun deleteRecursive(path: String, recursive: Boolean, handler: Handler<AsyncResult<Void>>): FileSystem
Deletes the file represented by the specified If the path represents a directory and |
|
open fun deleteRecursiveBlocking(path: String, recursive: Boolean): FileSystem
Blocking version of |
|
open fun equals(other: Any?): Boolean |
|
open fun exists(path: String, handler: Handler<AsyncResult<Boolean>>): FileSystem
Determines whether the file as specified by the path |
|
open fun existsBlocking(path: String): Boolean
Blocking version of |
|
open fun fsProps(path: String, handler: Handler<AsyncResult<FileSystemProps>>): FileSystem
Returns properties of the file-system being used by the specified |
|
open fun fsPropsBlocking(path: String): FileSystemProps
Blocking version of |
|
open fun getDelegate(): FileSystem |
|
open fun hashCode(): Int |
|
open fun link(link: String, existing: String, handler: Handler<AsyncResult<Void>>): FileSystem
Create a hard link on the file system from |
|
open fun linkBlocking(link: String, existing: String): FileSystem
Blocking version of |
|
open fun lprops(path: String, handler: Handler<AsyncResult<FileProps>>): FileSystem
Obtain properties for the link represented by The link will not be followed. |
|
open fun lpropsBlocking(path: String): FileProps
Blocking version of |
|
open fun mkdir(path: String, handler: Handler<AsyncResult<Void>>): FileSystem
Create the directory represented by The operation will fail if the directory already exists. open fun mkdir(path: String, perms: String, handler: Handler<AsyncResult<Void>>): FileSystem
Create the directory represented by The new directory will be created with permissions as specified by The permission String takes the form rwxr-x--- as specified in here. The operation will fail if the directory already exists. |
|
open fun mkdirBlocking(path: String): FileSystemopen fun mkdirBlocking(path: String, perms: String): FileSystem
Blocking version of |
|
open fun mkdirs(path: String, handler: Handler<AsyncResult<Void>>): FileSystem
Create the directory represented by The operation will fail if the directory already exists. open fun mkdirs(path: String, perms: String, handler: Handler<AsyncResult<Void>>): FileSystem
Create the directory represented by The new directory will be created with permissions as specified by The permission String takes the form rwxr-x--- as specified in here. The operation will fail if the directory already exists. |
|
open fun mkdirsBlocking(path: String): FileSystemopen fun mkdirsBlocking(path: String, perms: String): FileSystem
Blocking version of |
|
open fun move(from: String, to: String, handler: Handler<AsyncResult<Void>>): FileSystem
Move a file from the path The move will fail if the destination already exists. open fun move(from: String, to: String, options: CopyOptions, handler: Handler<AsyncResult<Void>>): FileSystem
Move a file from the path |
|
open fun moveBlocking(from: String, to: String): FileSystem
Blocking version of |
|
open static fun newInstance(arg: FileSystem): FileSystem |
|
open fun open(path: String, options: OpenOptions, handler: Handler<AsyncResult<AsyncFile>>): FileSystem
Open the file represented by The file is opened for both reading and writing. If the file does not already exist it will be created. |
|
open fun openBlocking(path: String, options: OpenOptions): AsyncFile
Blocking version of |
|
open fun props(path: String, handler: Handler<AsyncResult<FileProps>>): FileSystem
Obtain properties for the file represented by If the file is a link, the link will be followed. |
|
open fun propsBlocking(path: String): FileProps
Blocking version of |
|
open fun readDir(path: String, handler: Handler<AsyncResult<MutableList<String>>>): FileSystem
Read the contents of the directory specified by The result is an array of String representing the paths of the files inside the directory. open fun readDir(path: String, filter: String, handler: Handler<AsyncResult<MutableList<String>>>): FileSystem
Read the contents of the directory specified by The parameter The result is an array of String representing the paths of the files inside the directory. |
|
open fun readDirBlocking(path: String): MutableList<String>open fun readDirBlocking(path: String, filter: String): MutableList<String>
Blocking version of |
|
open fun readFile(path: String, handler: Handler<AsyncResult<Buffer>>): FileSystem
Reads the entire file as represented by the path Do not use this method to read very large files or you risk running out of available RAM. |
|
open fun readFileBlocking(path: String): Buffer
Blocking version of |
|
open fun readSymlink(link: String, handler: Handler<AsyncResult<String>>): FileSystem
Returns the path representing the file that the symbolic link specified by |
|
open fun readSymlinkBlocking(link: String): String
Blocking version of |
|
open fun rxChmod(path: String, perms: String): Single<Void>
Change the permissions on the file represented by The permission String takes the form rwxr-x--- as specified here. |
|
open fun rxChmodRecursive(path: String, perms: String, dirPerms: String): Single<Void>
Change the permissions on the file represented by The permission String takes the form rwxr-x--- as specified in {here}. If the file is directory then all contents will also have their permissions changed recursively. Any directory permissions will be set to |
|
open fun rxChown(path: String, user: String, group: String): Single<Void>
Change the ownership on the file represented by |
|
open fun rxCopy(from: String, to: String): Single<Void>
Copy a file from the path The copy will fail if the destination already exists. open fun rxCopy(from: String, to: String, options: CopyOptions): Single<Void>
Copy a file from the path |
|
open fun rxCopyRecursive(from: String, to: String, recursive: Boolean): Single<Void>
Copy a file from the path If The copy will fail if the destination if the destination already exists. |
|
open fun rxCreateFile(path: String): Single<Void>
Creates an empty file with the specified open fun rxCreateFile(path: String, perms: String): Single<Void>
Creates an empty file with the specified |
|
open fun rxDelete(path: String): Single<Void>
Deletes the file represented by the specified |
|
open fun rxDeleteRecursive(path: String, recursive: Boolean): Single<Void>
Deletes the file represented by the specified If the path represents a directory and |
|
open fun rxExists(path: String): Single<Boolean>
Determines whether the file as specified by the path |
|
open fun rxFsProps(path: String): Single<FileSystemProps>
Returns properties of the file-system being used by the specified |
|
open fun rxLink(link: String, existing: String): Single<Void>
Create a hard link on the file system from |
|
open fun rxLprops(path: String): Single<FileProps>
Obtain properties for the link represented by The link will not be followed. |
|
open fun rxMkdir(path: String): Single<Void>
Create the directory represented by The operation will fail if the directory already exists. open fun rxMkdir(path: String, perms: String): Single<Void>
Create the directory represented by The new directory will be created with permissions as specified by The permission String takes the form rwxr-x--- as specified in here. The operation will fail if the directory already exists. |
|
open fun rxMkdirs(path: String): Single<Void>
Create the directory represented by The operation will fail if the directory already exists. open fun rxMkdirs(path: String, perms: String): Single<Void>
Create the directory represented by The new directory will be created with permissions as specified by The permission String takes the form rwxr-x--- as specified in here. The operation will fail if the directory already exists. |
|
open fun rxMove(from: String, to: String): Single<Void>
Move a file from the path The move will fail if the destination already exists. open fun rxMove(from: String, to: String, options: CopyOptions): Single<Void>
Move a file from the path |
|
open fun rxOpen(path: String, options: OpenOptions): Single<AsyncFile>
Open the file represented by The file is opened for both reading and writing. If the file does not already exist it will be created. |
|
open fun rxProps(path: String): Single<FileProps>
Obtain properties for the file represented by If the file is a link, the link will be followed. |
|
open fun rxReadDir(path: String): Single<MutableList<String>>
Read the contents of the directory specified by The result is an array of String representing the paths of the files inside the directory. open fun rxReadDir(path: String, filter: String): Single<MutableList<String>>
Read the contents of the directory specified by The parameter The result is an array of String representing the paths of the files inside the directory. |
|
open fun rxReadFile(path: String): Single<Buffer>
Reads the entire file as represented by the path Do not use this method to read very large files or you risk running out of available RAM. |
|
open fun rxReadSymlink(link: String): Single<String>
Returns the path representing the file that the symbolic link specified by |
|
open fun rxSymlink(link: String, existing: String): Single<Void>
Create a symbolic link on the file system from |
|
open fun rxTruncate(path: String, len: Long): Single<Void>
Truncate the file represented by The operation will fail if the file does not exist or |
|
open fun rxUnlink(link: String): Single<Void>
Unlinks the link on the file system represented by the path |
|
open fun rxWriteFile(path: String, data: Buffer): Single<Void>
Creates the file, and writes the specified |
|
open fun symlink(link: String, existing: String, handler: Handler<AsyncResult<Void>>): FileSystem
Create a symbolic link on the file system from |
|
open fun symlinkBlocking(link: String, existing: String): FileSystem
Blocking version of |
|
open fun toString(): String |
|
open fun truncate(path: String, len: Long, handler: Handler<AsyncResult<Void>>): FileSystem
Truncate the file represented by The operation will fail if the file does not exist or |
|
open fun truncateBlocking(path: String, len: Long): FileSystem
Blocking version of |
|
open fun unlink(link: String, handler: Handler<AsyncResult<Void>>): FileSystem
Unlinks the link on the file system represented by the path |
|
open fun unlinkBlocking(link: String): FileSystem
Blocking version of |
|
open fun writeFile(path: String, data: Buffer, handler: Handler<AsyncResult<Void>>): FileSystem
Creates the file, and writes the specified |
|
open fun writeFileBlocking(path: String, data: Buffer): FileSystem
Blocking version of |