class FileSystem extends AnyRef
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.
- Alphabetic
- By Inheritance
- FileSystem
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FileSystem(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
chmod(path: String, perms: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Change the permissions on the file represented by
path
toperms
, asynchronously.Change the permissions on the file represented by
path
toperms
, asynchronously.The permission String takes the form rwxr-x--- as specified here. * @param path the path to the file
- perms
the permissions string
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
chmodBlocking(path: String, perms: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem
-
def
chmodFuture(path: String, perms: String): scala.concurrent.Future[Unit]
Like chmod but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
chmodRecursive(path: String, perms: String, dirPerms: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Change the permissions on the file represented by
path
toperms
, asynchronously.Change the permissions on the file represented by
path
toperms
, asynchronously. 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
dirPerms
, whilst any normal file permissions will be set toperms
. * @param path the path to the file- perms
the permissions string
- dirPerms
the directory permissions
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
chmodRecursiveBlocking(path: String, perms: String, dirPerms: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#chmodRecursive
-
def
chmodRecursiveFuture(path: String, perms: String, dirPerms: String): scala.concurrent.Future[Unit]
Like chmodRecursive but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
chown(path: String, user: Option[String], group: Option[String], handler: Handler[AsyncResult[Unit]]): FileSystem
Change the ownership on the file represented by
path
touser
and {code group, asynchronously. * @param path the path to the file
Change the ownership on the file represented by
path
touser
and {code group, asynchronously. * @param path the path to the file
- user
the user name,
null
will not change the user name- group
the user group,
null
will not change the user group name- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
chownBlocking(path: String, user: Option[String], group: Option[String]): FileSystem
Blocking version of
-
def
chownFuture(path: String, user: Option[String], group: Option[String]): scala.concurrent.Future[Unit]
Like chown but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
copy(from: String, to: String, options: CopyOptions, handler: Handler[AsyncResult[Unit]]): FileSystem
Copy a file from the path
from
to pathto
, asynchronously.Copy a file from the path
from
to pathto
, asynchronously. * @param from the path to copy from- to
the path to copy to
- options
options describing how the file should be copied see CopyOptions
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
copy(from: String, to: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Copy a file from the path
from
to pathto
, asynchronously.Copy a file from the path
from
to pathto
, asynchronously.The copy will fail if the destination already exists. * @param from the path to copy from
- to
the path to copy to
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
copyBlocking(from: String, to: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#copy
-
def
copyFuture(from: String, to: String, options: CopyOptions): scala.concurrent.Future[Unit]
Like copy but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
copyFuture(from: String, to: String): scala.concurrent.Future[Unit]
Like copy but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
copyRecursive(from: String, to: String, recursive: Boolean, handler: Handler[AsyncResult[Unit]]): FileSystem
Copy a file from the path
from
to pathto
, asynchronously.Copy a file from the path
from
to pathto
, asynchronously.If
recursive
istrue
andfrom
represents a directory, then the directory and its contents will be copied recursively to the destinationto
.The copy will fail if the destination if the destination already exists. * @param from the path to copy from
- to
the path to copy to
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
copyRecursiveBlocking(from: String, to: String, recursive: Boolean): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#copyRecursive
-
def
copyRecursiveFuture(from: String, to: String, recursive: Boolean): scala.concurrent.Future[Unit]
Like copyRecursive but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createFile(path: String, perms: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Creates an empty file with the specified
path
and permissionsperms
, asynchronously.Creates an empty file with the specified
path
and permissionsperms
, asynchronously. * @param path path to the file- perms
the permissions string
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
createFile(path: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Creates an empty file with the specified
path
, asynchronously.Creates an empty file with the specified
path
, asynchronously. * @param path path to the file- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
createFileBlocking(path: String, perms: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#createFile
-
def
createFileBlocking(path: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#createFile
-
def
createFileFuture(path: String, perms: String): scala.concurrent.Future[Unit]
Like createFile but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createFileFuture(path: String): scala.concurrent.Future[Unit]
Like createFile but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createTempDirectory(dir: String, prefix: String, perms: String, handler: Handler[AsyncResult[String]]): FileSystem
Creates a new directory in the directory provided by the path
path
, using the given prefix to generate its name, asynchronously.Creates a new directory in the directory provided by the path
path
, using the given prefix to generate its name, asynchronously.The new directory will be created with permissions as specified by
perms
.The permission String takes the form rwxr-x--- as specified in here.
As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.A #addShutdownHook shutdown-hook, or the deleteOnExit mechanism may be used to delete the directory automatically. * @param dir the path to directory in which to create the directory- prefix
the prefix string to be used in generating the directory's name; may be
null
- perms
the permissions string
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
createTempDirectory(prefix: String, perms: String, handler: Handler[AsyncResult[String]]): FileSystem
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.
The new directory will be created with permissions as specified by
perms
.The permission String takes the form rwxr-x--- as specified in here.
As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.A #addShutdownHook shutdown-hook, or the deleteOnExit mechanism may be used to delete the directory automatically. * @param prefix the prefix string to be used in generating the directory's name; may benull
- perms
the permissions string
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
createTempDirectory(prefix: String, handler: Handler[AsyncResult[String]]): FileSystem
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.
As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.A #addShutdownHook shutdown-hook, or the deleteOnExit mechanism may be used to delete the directory automatically. * @param prefix the prefix string to be used in generating the directory's name; may benull
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
createTempDirectoryBlocking(dir: String, prefix: String, perms: String): String
Blocking version of io.vertx.scala.core.file.FileSystem#createTempDirectory
-
def
createTempDirectoryBlocking(prefix: String, perms: String): String
Blocking version of io.vertx.scala.core.file.FileSystem#createTempDirectory
-
def
createTempDirectoryBlocking(prefix: String): String
Blocking version of io.vertx.scala.core.file.FileSystem#createTempDirectory
-
def
createTempDirectoryFuture(dir: String, prefix: String, perms: String): scala.concurrent.Future[String]
Like createTempDirectory but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createTempDirectoryFuture(prefix: String, perms: String): scala.concurrent.Future[String]
Like createTempDirectory but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createTempDirectoryFuture(prefix: String): scala.concurrent.Future[String]
Like createTempDirectory but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createTempFile(dir: String, prefix: String, suffix: String, perms: String, handler: Handler[AsyncResult[String]]): FileSystem
Creates a new file in the directory provided by the path
dir
, using the given prefix and suffix to generate its name, asynchronously.Creates a new file in the directory provided by the path
dir
, using the given prefix and suffix to generate its name, asynchronously.The new directory will be created with permissions as specified by
perms
.The permission String takes the form rwxr-x--- as specified in here.
As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.A #addShutdownHook shutdown-hook, or the deleteOnExit mechanism may be used to delete the directory automatically. * @param dir the path to directory in which to create the directory- prefix
the prefix string to be used in generating the directory's name; may be
null
- suffix
the suffix string to be used in generating the file's name; may be
null
, in which case ".tmp
" is used- perms
the permissions string
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
createTempFile(prefix: String, suffix: String, perms: String, handler: Handler[AsyncResult[String]]): FileSystem
Creates a new file in the directory provided by the path
dir
, using the given prefix and suffix to generate its name, asynchronously.Creates a new file in the directory provided by the path
dir
, using the given prefix and suffix to generate its name, asynchronously.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.A #addShutdownHook shutdown-hook, or the deleteOnExit mechanism may be used to delete the directory automatically. * @param prefix the prefix string to be used in generating the directory's name; may benull
- suffix
the suffix string to be used in generating the file's name; may be
null
, in which case ".tmp
" is used- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
createTempFile(prefix: String, suffix: String, handler: Handler[AsyncResult[String]]): FileSystem
Creates a new file in the default temporary-file directory, using the given prefix and suffix to generate its name, asynchronously.
Creates a new file in the default temporary-file directory, using the given prefix and suffix to generate its name, asynchronously.
As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.A #addShutdownHook shutdown-hook, or the deleteOnExit mechanism may be used to delete the directory automatically. * @param prefix the prefix string to be used in generating the directory's name; may benull
- suffix
the suffix string to be used in generating the file's name; may be
null
, in which case ".tmp
" is used- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
createTempFileBlocking(dir: String, prefix: String, suffix: String, perms: String): String
Blocking version of io.vertx.scala.core.file.FileSystem#createTempFile
-
def
createTempFileBlocking(prefix: String, suffix: String, perms: String): String
Blocking version of io.vertx.scala.core.file.FileSystem#createTempFile
-
def
createTempFileBlocking(prefix: String, suffix: String): String
Blocking version of io.vertx.scala.core.file.FileSystem#createTempFile
-
def
createTempFileFuture(dir: String, prefix: String, suffix: String, perms: String): scala.concurrent.Future[String]
Like createTempFile but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createTempFileFuture(prefix: String, suffix: String, perms: String): scala.concurrent.Future[String]
Like createTempFile but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createTempFileFuture(prefix: String, suffix: String): scala.concurrent.Future[String]
Like createTempFile but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
delete(path: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Deletes the file represented by the specified
path
, asynchronously.Deletes the file represented by the specified
path
, asynchronously. * @param path path to the file- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
deleteBlocking(path: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#delete
-
def
deleteFuture(path: String): scala.concurrent.Future[Unit]
Like delete but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
deleteRecursive(path: String, recursive: Boolean, handler: Handler[AsyncResult[Unit]]): FileSystem
Deletes the file represented by the specified
path
, asynchronously.Deletes the file represented by the specified
path
, asynchronously.If the path represents a directory and
recursive = true
then the directory and its contents will be deleted recursively. * @param path path to the file- recursive
delete recursively?
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
deleteRecursiveBlocking(path: String, recursive: Boolean): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#deleteRecursive
-
def
deleteRecursiveFuture(path: String, recursive: Boolean): scala.concurrent.Future[Unit]
Like deleteRecursive but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exists(path: String, handler: Handler[AsyncResult[Boolean]]): FileSystem
Determines whether the file as specified by the path
path
exists, asynchronously.Determines whether the file as specified by the path
path
exists, asynchronously. * @param path path to the file- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
existsBlocking(path: String): Boolean
Blocking version of io.vertx.scala.core.file.FileSystem#exists
-
def
existsFuture(path: String): scala.concurrent.Future[Boolean]
Like exists but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fsProps(path: String, handler: Handler[AsyncResult[FileSystemProps]]): FileSystem
Returns properties of the file-system being used by the specified
path
, asynchronously.Returns properties of the file-system being used by the specified
path
, asynchronously. * @param path path to anywhere on the filesystem- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
fsPropsBlocking(path: String): FileSystemProps
Blocking version of io.vertx.scala.core.file.FileSystem#fsProps
-
def
fsPropsFuture(path: String): scala.concurrent.Future[FileSystemProps]
Like fsProps but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
link(link: String, existing: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Create a hard link on the file system from
link
toexisting
, asynchronously.Create a hard link on the file system from
link
toexisting
, asynchronously. * @param link the link- existing
the link destination
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
linkBlocking(link: String, existing: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#link
-
def
linkFuture(link: String, existing: String): scala.concurrent.Future[Unit]
Like link but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
lprops(path: String, handler: Handler[AsyncResult[FileProps]]): FileSystem
Obtain properties for the link represented by
path
, asynchronously.Obtain properties for the link represented by
path
, asynchronously.The link will not be followed. * @param path the path to the file
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
lpropsBlocking(path: String): FileProps
Blocking version of io.vertx.scala.core.file.FileSystem#lprops
-
def
lpropsFuture(path: String): scala.concurrent.Future[FileProps]
Like lprops but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
mkdir(path: String, perms: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Create the directory represented by
path
, asynchronously.Create the directory represented by
path
, asynchronously.The new directory will be created with permissions as specified by
perms
.The permission String takes the form rwxr-x--- as specified in here.
The operation will fail if the directory already exists. * @param path path to the file
- perms
the permissions string
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
mkdir(path: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Create the directory represented by
path
, asynchronously.Create the directory represented by
path
, asynchronously.The operation will fail if the directory already exists. * @param path path to the file
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
mkdirBlocking(path: String, perms: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#mkdir
-
def
mkdirBlocking(path: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#mkdir
-
def
mkdirFuture(path: String, perms: String): scala.concurrent.Future[Unit]
Like mkdir but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
mkdirFuture(path: String): scala.concurrent.Future[Unit]
Like mkdir but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
mkdirs(path: String, perms: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Create the directory represented by
path
and any non existent parents, asynchronously.Create the directory represented by
path
and any non existent parents, asynchronously.The new directory will be created with permissions as specified by
perms
.The permission String takes the form rwxr-x--- as specified in here.
The operation will fail if the directory already exists. * @param path path to the file
- perms
the permissions string
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
mkdirs(path: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Create the directory represented by
path
and any non existent parents, asynchronously.Create the directory represented by
path
and any non existent parents, asynchronously.The operation will fail if the directory already exists. * @param path path to the file
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
mkdirsBlocking(path: String, perms: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#mkdirs
-
def
mkdirsBlocking(path: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#mkdirs
-
def
mkdirsFuture(path: String, perms: String): scala.concurrent.Future[Unit]
Like mkdirs but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
mkdirsFuture(path: String): scala.concurrent.Future[Unit]
Like mkdirs but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
move(from: String, to: String, options: CopyOptions, handler: Handler[AsyncResult[Unit]]): FileSystem
Move a file from the path
from
to pathto
, asynchronously.Move a file from the path
from
to pathto
, asynchronously. * @param from the path to copy from- to
the path to copy to
- options
options describing how the file should be copied see CopyOptions
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
move(from: String, to: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Move a file from the path
from
to pathto
, asynchronously.Move a file from the path
from
to pathto
, asynchronously.The move will fail if the destination already exists. * @param from the path to copy from
- to
the path to copy to
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
moveBlocking(from: String, to: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#move
-
def
moveFuture(from: String, to: String, options: CopyOptions): scala.concurrent.Future[Unit]
Like move but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
moveFuture(from: String, to: String): scala.concurrent.Future[Unit]
Like move but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
open(path: String, options: OpenOptions, handler: Handler[AsyncResult[AsyncFile]]): FileSystem
Open the file represented by
path
, asynchronously.Open the file represented by
path
, asynchronously.The file is opened for both reading and writing. If the file does not already exist it will be created. * @param path path to the file
- options
options describing how the file should be opened see OpenOptions
- returns
a reference to this, so the API can be used fluently
-
def
openBlocking(path: String, options: OpenOptions): AsyncFile
Blocking version of io.vertx.scala.core.file.FileSystem#open
-
def
openFuture(path: String, options: OpenOptions): scala.concurrent.Future[AsyncFile]
Like open but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
props(path: String, handler: Handler[AsyncResult[FileProps]]): FileSystem
Obtain properties for the file represented by
path
, asynchronously.Obtain properties for the file represented by
path
, asynchronously.If the file is a link, the link will be followed. * @param path the path to the file
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
propsBlocking(path: String): FileProps
Blocking version of io.vertx.scala.core.file.FileSystem#props
-
def
propsFuture(path: String): scala.concurrent.Future[FileProps]
Like props but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
readDir(path: String, filter: String, handler: Handler[AsyncResult[Buffer[String]]]): FileSystem
Read the contents of the directory specified by
path
, asynchronously.Read the contents of the directory specified by
path
, asynchronously.The parameter
filter
is a regular expression. Iffilter
is specified then only the paths that match @{filterwill be returned.
The result is an array of String representing the paths of the files inside the directory. * @param path path to the directory
- filter
the filter expression
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
readDir(path: String, handler: Handler[AsyncResult[Buffer[String]]]): FileSystem
Read the contents of the directory specified by
path
, asynchronously.Read the contents of the directory specified by
path
, asynchronously.The result is an array of String representing the paths of the files inside the directory. * @param path path to the file
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
readDirBlocking(path: String, filter: String): Buffer[String]
Blocking version of io.vertx.scala.core.file.FileSystem#readDir
-
def
readDirBlocking(path: String): Buffer[String]
Blocking version of io.vertx.scala.core.file.FileSystem#readDir
-
def
readDirFuture(path: String, filter: String): scala.concurrent.Future[Buffer[String]]
Like readDir but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
readDirFuture(path: String): scala.concurrent.Future[Buffer[String]]
Like readDir but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
readFile(path: String, handler: Handler[AsyncResult[Buffer]]): FileSystem
Reads the entire file as represented by the path
path
as a , asynchronously.Reads the entire file as represented by the path
path
as a , asynchronously.Do not use this method to read very large files or you risk running out of available RAM. * @param path path to the file
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
readFileBlocking(path: String): Buffer
Blocking version of io.vertx.scala.core.file.FileSystem#readFile
-
def
readFileFuture(path: String): scala.concurrent.Future[Buffer]
Like readFile but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
readSymlink(link: String, handler: Handler[AsyncResult[String]]): FileSystem
Returns the path representing the file that the symbolic link specified by
link
points to, asynchronously.Returns the path representing the file that the symbolic link specified by
link
points to, asynchronously. * @param link the link- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
readSymlinkBlocking(link: String): String
Blocking version of io.vertx.scala.core.file.FileSystem#readSymlink
-
def
readSymlinkFuture(link: String): scala.concurrent.Future[String]
Like readSymlink but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
symlink(link: String, existing: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Create a symbolic link on the file system from
link
toexisting
, asynchronously.Create a symbolic link on the file system from
link
toexisting
, asynchronously. * @param link the link- existing
the link destination
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
symlinkBlocking(link: String, existing: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#link
-
def
symlinkFuture(link: String, existing: String): scala.concurrent.Future[Unit]
Like symlink but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
truncate(path: String, len: Long, handler: Handler[AsyncResult[Unit]]): FileSystem
Truncate the file represented by
path
to lengthlen
in bytes, asynchronously.Truncate the file represented by
path
to lengthlen
in bytes, asynchronously.The operation will fail if the file does not exist or
len
is less thanzero
. * @param path the path to the file- len
the length to truncate it to
- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
truncateBlocking(path: String, len: Long): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#truncate
-
def
truncateFuture(path: String, len: Long): scala.concurrent.Future[Unit]
Like truncate but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
unlink(link: String, handler: Handler[AsyncResult[Unit]]): FileSystem
Unlinks the link on the file system represented by the path
link
, asynchronously.Unlinks the link on the file system represented by the path
link
, asynchronously. * @param link the link- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
unlinkBlocking(link: String): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#unlink
-
def
unlinkFuture(link: String): scala.concurrent.Future[Unit]
Like unlink but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
writeFile(path: String, data: Buffer, handler: Handler[AsyncResult[Unit]]): FileSystem
Creates the file, and writes the specified
Buffer data
to the file represented by the pathpath
, asynchronously.Creates the file, and writes the specified
Buffer data
to the file represented by the pathpath
, asynchronously. * @param path path to the file- handler
the handler that will be called on completion
- returns
a reference to this, so the API can be used fluently
-
def
writeFileBlocking(path: String, data: Buffer): FileSystem
Blocking version of io.vertx.scala.core.file.FileSystem#writeFile
-
def
writeFileFuture(path: String, data: Buffer): scala.concurrent.Future[Unit]
Like writeFile but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.