Class FileSystem
- java.lang.Object
-
- io.vertx.reactivex.core.file.FileSystem
-
public class FileSystem extends Object
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 theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<FileSystem>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description FileSystem(FileSystem delegate)
FileSystem(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FileSystem
chmod(String path, String perms)
Change the permissions on the file represented bypath
toperms
, asynchronously.FileSystem
chmod(String path, String perms, Handler<AsyncResult<Void>> handler)
Change the permissions on the file represented bypath
toperms
, asynchronously.FileSystem
chmodBlocking(String path, String perms)
Blocking version of#chmod(String, String, Handler)
FileSystem
chmodRecursive(String path, String perms, String dirPerms)
Change the permissions on the file represented bypath
toperms
, asynchronously.FileSystem
chmodRecursive(String path, String perms, String dirPerms, Handler<AsyncResult<Void>> handler)
Change the permissions on the file represented bypath
toperms
, asynchronously.FileSystem
chmodRecursiveBlocking(String path, String perms, String dirPerms)
FileSystem
chown(String path, String user, String group)
Change the ownership on the file represented bypath
touser
and {code group}, asynchronously.FileSystem
chown(String path, String user, String group, Handler<AsyncResult<Void>> handler)
Change the ownership on the file represented bypath
touser
and {code group}, asynchronously.FileSystem
chownBlocking(String path, String user, String group)
FileSystem
copy(String from, String to)
Copy a file from the pathfrom
to pathto
, asynchronously.FileSystem
copy(String from, String to, CopyOptions options)
Copy a file from the pathfrom
to pathto
, asynchronously.FileSystem
copy(String from, String to, CopyOptions options, Handler<AsyncResult<Void>> handler)
Copy a file from the pathfrom
to pathto
, asynchronously.FileSystem
copy(String from, String to, Handler<AsyncResult<Void>> handler)
Copy a file from the pathfrom
to pathto
, asynchronously.FileSystem
copyBlocking(String from, String to)
FileSystem
copyRecursive(String from, String to, boolean recursive)
Copy a file from the pathfrom
to pathto
, asynchronously.FileSystem
copyRecursive(String from, String to, boolean recursive, Handler<AsyncResult<Void>> handler)
Copy a file from the pathfrom
to pathto
, asynchronously.FileSystem
copyRecursiveBlocking(String from, String to, boolean recursive)
FileSystem
createFile(String path)
Creates an empty file with the specifiedpath
, asynchronously.FileSystem
createFile(String path, Handler<AsyncResult<Void>> handler)
Creates an empty file with the specifiedpath
, asynchronously.FileSystem
createFile(String path, String perms)
Creates an empty file with the specifiedpath
and permissionsperms
, asynchronously.FileSystem
createFile(String path, String perms, Handler<AsyncResult<Void>> handler)
Creates an empty file with the specifiedpath
and permissionsperms
, asynchronously.FileSystem
createFileBlocking(String path)
FileSystem
createFileBlocking(String path, String perms)
FileSystem
createTempDirectory(String prefix)
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.FileSystem
createTempDirectory(String prefix, Handler<AsyncResult<String>> handler)
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.FileSystem
createTempDirectory(String prefix, String perms)
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.FileSystem
createTempDirectory(String prefix, String perms, Handler<AsyncResult<String>> handler)
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.FileSystem
createTempDirectory(String dir, String prefix, String perms)
Creates a new directory in the directory provided by the pathpath
, using the given prefix to generate its name, asynchronously.FileSystem
createTempDirectory(String dir, String prefix, String perms, Handler<AsyncResult<String>> handler)
Creates a new directory in the directory provided by the pathpath
, using the given prefix to generate its name, asynchronously.String
createTempDirectoryBlocking(String prefix)
String
createTempDirectoryBlocking(String prefix, String perms)
String
createTempDirectoryBlocking(String dir, String prefix, String perms)
FileSystem
createTempFile(String prefix, String suffix)
Creates a new file in the default temporary-file directory, using the given prefix and suffix to generate its name, asynchronously.FileSystem
createTempFile(String prefix, String suffix, Handler<AsyncResult<String>> handler)
Creates a new file in the default temporary-file directory, using the given prefix and suffix to generate its name, asynchronously.FileSystem
createTempFile(String prefix, String suffix, String perms)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.FileSystem
createTempFile(String prefix, String suffix, String perms, Handler<AsyncResult<String>> handler)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.FileSystem
createTempFile(String dir, String prefix, String suffix, String perms)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.FileSystem
createTempFile(String dir, String prefix, String suffix, String perms, Handler<AsyncResult<String>> handler)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.String
createTempFileBlocking(String prefix, String suffix)
String
createTempFileBlocking(String prefix, String suffix, String perms)
String
createTempFileBlocking(String dir, String prefix, String suffix, String perms)
FileSystem
delete(String path)
Deletes the file represented by the specifiedpath
, asynchronously.FileSystem
delete(String path, Handler<AsyncResult<Void>> handler)
Deletes the file represented by the specifiedpath
, asynchronously.FileSystem
deleteBlocking(String path)
FileSystem
deleteRecursive(String path, boolean recursive)
Deletes the file represented by the specifiedpath
, asynchronously.FileSystem
deleteRecursive(String path, boolean recursive, Handler<AsyncResult<Void>> handler)
Deletes the file represented by the specifiedpath
, asynchronously.FileSystem
deleteRecursiveBlocking(String path, boolean recursive)
boolean
equals(Object o)
FileSystem
exists(String path)
Determines whether the file as specified by the pathpath
exists, asynchronously.FileSystem
exists(String path, Handler<AsyncResult<Boolean>> handler)
Determines whether the file as specified by the pathpath
exists, asynchronously.boolean
existsBlocking(String path)
FileSystem
fsProps(String path)
Returns properties of the file-system being used by the specifiedpath
, asynchronously.FileSystem
fsProps(String path, Handler<AsyncResult<FileSystemProps>> handler)
Returns properties of the file-system being used by the specifiedpath
, asynchronously.FileSystemProps
fsPropsBlocking(String path)
FileSystem
getDelegate()
int
hashCode()
FileSystem
link(String link, String existing)
Create a hard link on the file system fromlink
toexisting
, asynchronously.FileSystem
link(String link, String existing, Handler<AsyncResult<Void>> handler)
Create a hard link on the file system fromlink
toexisting
, asynchronously.FileSystem
linkBlocking(String link, String existing)
FileSystem
lprops(String path)
Obtain properties for the link represented bypath
, asynchronously.FileSystem
lprops(String path, Handler<AsyncResult<FileProps>> handler)
Obtain properties for the link represented bypath
, asynchronously.FileProps
lpropsBlocking(String path)
FileSystem
mkdir(String path)
Create the directory represented bypath
, asynchronously.FileSystem
mkdir(String path, Handler<AsyncResult<Void>> handler)
Create the directory represented bypath
, asynchronously.FileSystem
mkdir(String path, String perms)
Create the directory represented bypath
, asynchronously.FileSystem
mkdir(String path, String perms, Handler<AsyncResult<Void>> handler)
Create the directory represented bypath
, asynchronously.FileSystem
mkdirBlocking(String path)
FileSystem
mkdirBlocking(String path, String perms)
FileSystem
mkdirs(String path)
Create the directory represented bypath
and any non existent parents, asynchronously.FileSystem
mkdirs(String path, Handler<AsyncResult<Void>> handler)
Create the directory represented bypath
and any non existent parents, asynchronously.FileSystem
mkdirs(String path, String perms)
Create the directory represented bypath
and any non existent parents, asynchronously.FileSystem
mkdirs(String path, String perms, Handler<AsyncResult<Void>> handler)
Create the directory represented bypath
and any non existent parents, asynchronously.FileSystem
mkdirsBlocking(String path)
FileSystem
mkdirsBlocking(String path, String perms)
FileSystem
move(String from, String to)
Move a file from the pathfrom
to pathto
, asynchronously.FileSystem
move(String from, String to, CopyOptions options)
Move a file from the pathfrom
to pathto
, asynchronously.FileSystem
move(String from, String to, CopyOptions options, Handler<AsyncResult<Void>> handler)
Move a file from the pathfrom
to pathto
, asynchronously.FileSystem
move(String from, String to, Handler<AsyncResult<Void>> handler)
Move a file from the pathfrom
to pathto
, asynchronously.FileSystem
moveBlocking(String from, String to)
static FileSystem
newInstance(FileSystem arg)
FileSystem
open(String path, OpenOptions options)
Open the file represented bypath
, asynchronously.FileSystem
open(String path, OpenOptions options, Handler<AsyncResult<AsyncFile>> handler)
Open the file represented bypath
, asynchronously.AsyncFile
openBlocking(String path, OpenOptions options)
FileSystem
props(String path)
Obtain properties for the file represented bypath
, asynchronously.FileSystem
props(String path, Handler<AsyncResult<FileProps>> handler)
Obtain properties for the file represented bypath
, asynchronously.FileProps
propsBlocking(String path)
FileSystem
readDir(String path)
Read the contents of the directory specified bypath
, asynchronously.FileSystem
readDir(String path, Handler<AsyncResult<List<String>>> handler)
Read the contents of the directory specified bypath
, asynchronously.FileSystem
readDir(String path, String filter)
Read the contents of the directory specified bypath
, asynchronously.FileSystem
readDir(String path, String filter, Handler<AsyncResult<List<String>>> handler)
Read the contents of the directory specified bypath
, asynchronously.List<String>
readDirBlocking(String path)
List<String>
readDirBlocking(String path, String filter)
FileSystem
readFile(String path)
Reads the entire file as represented by the pathpath
as a , asynchronously.FileSystem
readFile(String path, Handler<AsyncResult<Buffer>> handler)
Reads the entire file as represented by the pathpath
as a , asynchronously.Buffer
readFileBlocking(String path)
FileSystem
readSymlink(String link)
Returns the path representing the file that the symbolic link specified bylink
points to, asynchronously.FileSystem
readSymlink(String link, Handler<AsyncResult<String>> handler)
Returns the path representing the file that the symbolic link specified bylink
points to, asynchronously.String
readSymlinkBlocking(String link)
io.reactivex.Completable
rxChmod(String path, String perms)
Change the permissions on the file represented bypath
toperms
, asynchronously.io.reactivex.Completable
rxChmodRecursive(String path, String perms, String dirPerms)
Change the permissions on the file represented bypath
toperms
, asynchronously.io.reactivex.Completable
rxChown(String path, String user, String group)
Change the ownership on the file represented bypath
touser
and {code group}, asynchronously.io.reactivex.Completable
rxCopy(String from, String to)
Copy a file from the pathfrom
to pathto
, asynchronously.io.reactivex.Completable
rxCopy(String from, String to, CopyOptions options)
Copy a file from the pathfrom
to pathto
, asynchronously.io.reactivex.Completable
rxCopyRecursive(String from, String to, boolean recursive)
Copy a file from the pathfrom
to pathto
, asynchronously.io.reactivex.Completable
rxCreateFile(String path)
Creates an empty file with the specifiedpath
, asynchronously.io.reactivex.Completable
rxCreateFile(String path, String perms)
Creates an empty file with the specifiedpath
and permissionsperms
, asynchronously.io.reactivex.Single<String>
rxCreateTempDirectory(String prefix)
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.io.reactivex.Single<String>
rxCreateTempDirectory(String prefix, String perms)
Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.io.reactivex.Single<String>
rxCreateTempDirectory(String dir, String prefix, String perms)
Creates a new directory in the directory provided by the pathpath
, using the given prefix to generate its name, asynchronously.io.reactivex.Single<String>
rxCreateTempFile(String prefix, String suffix)
Creates a new file in the default temporary-file directory, using the given prefix and suffix to generate its name, asynchronously.io.reactivex.Single<String>
rxCreateTempFile(String prefix, String suffix, String perms)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.io.reactivex.Single<String>
rxCreateTempFile(String dir, String prefix, String suffix, String perms)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.io.reactivex.Completable
rxDelete(String path)
Deletes the file represented by the specifiedpath
, asynchronously.io.reactivex.Completable
rxDeleteRecursive(String path, boolean recursive)
Deletes the file represented by the specifiedpath
, asynchronously.io.reactivex.Single<Boolean>
rxExists(String path)
Determines whether the file as specified by the pathpath
exists, asynchronously.io.reactivex.Single<FileSystemProps>
rxFsProps(String path)
Returns properties of the file-system being used by the specifiedpath
, asynchronously.io.reactivex.Completable
rxLink(String link, String existing)
Create a hard link on the file system fromlink
toexisting
, asynchronously.io.reactivex.Single<FileProps>
rxLprops(String path)
Obtain properties for the link represented bypath
, asynchronously.io.reactivex.Completable
rxMkdir(String path)
Create the directory represented bypath
, asynchronously.io.reactivex.Completable
rxMkdir(String path, String perms)
Create the directory represented bypath
, asynchronously.io.reactivex.Completable
rxMkdirs(String path)
Create the directory represented bypath
and any non existent parents, asynchronously.io.reactivex.Completable
rxMkdirs(String path, String perms)
Create the directory represented bypath
and any non existent parents, asynchronously.io.reactivex.Completable
rxMove(String from, String to)
Move a file from the pathfrom
to pathto
, asynchronously.io.reactivex.Completable
rxMove(String from, String to, CopyOptions options)
Move a file from the pathfrom
to pathto
, asynchronously.io.reactivex.Single<AsyncFile>
rxOpen(String path, OpenOptions options)
Open the file represented bypath
, asynchronously.io.reactivex.Single<FileProps>
rxProps(String path)
Obtain properties for the file represented bypath
, asynchronously.io.reactivex.Single<List<String>>
rxReadDir(String path)
Read the contents of the directory specified bypath
, asynchronously.io.reactivex.Single<List<String>>
rxReadDir(String path, String filter)
Read the contents of the directory specified bypath
, asynchronously.io.reactivex.Single<Buffer>
rxReadFile(String path)
Reads the entire file as represented by the pathpath
as a , asynchronously.io.reactivex.Single<String>
rxReadSymlink(String link)
Returns the path representing the file that the symbolic link specified bylink
points to, asynchronously.io.reactivex.Completable
rxSymlink(String link, String existing)
Create a symbolic link on the file system fromlink
toexisting
, asynchronously.io.reactivex.Completable
rxTruncate(String path, long len)
Truncate the file represented bypath
to lengthlen
in bytes, asynchronously.io.reactivex.Completable
rxUnlink(String link)
Unlinks the link on the file system represented by the pathlink
, asynchronously.io.reactivex.Completable
rxWriteFile(String path, Buffer data)
Creates the file, and writes the specifiedBuffer data
to the file represented by the pathpath
, asynchronously.FileSystem
symlink(String link, String existing)
Create a symbolic link on the file system fromlink
toexisting
, asynchronously.FileSystem
symlink(String link, String existing, Handler<AsyncResult<Void>> handler)
Create a symbolic link on the file system fromlink
toexisting
, asynchronously.FileSystem
symlinkBlocking(String link, String existing)
String
toString()
FileSystem
truncate(String path, long len)
Truncate the file represented bypath
to lengthlen
in bytes, asynchronously.FileSystem
truncate(String path, long len, Handler<AsyncResult<Void>> handler)
Truncate the file represented bypath
to lengthlen
in bytes, asynchronously.FileSystem
truncateBlocking(String path, long len)
FileSystem
unlink(String link)
Unlinks the link on the file system represented by the pathlink
, asynchronously.FileSystem
unlink(String link, Handler<AsyncResult<Void>> handler)
Unlinks the link on the file system represented by the pathlink
, asynchronously.FileSystem
unlinkBlocking(String link)
FileSystem
writeFile(String path, Buffer data)
Creates the file, and writes the specifiedBuffer data
to the file represented by the pathpath
, asynchronously.FileSystem
writeFile(String path, Buffer data, Handler<AsyncResult<Void>> handler)
Creates the file, and writes the specifiedBuffer data
to the file represented by the pathpath
, asynchronously.FileSystem
writeFileBlocking(String path, Buffer data)
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<FileSystem> __TYPE_ARG
-
-
Constructor Detail
-
FileSystem
public FileSystem(FileSystem delegate)
-
FileSystem
public FileSystem(Object delegate)
-
-
Method Detail
-
getDelegate
public FileSystem getDelegate()
-
copy
public FileSystem copy(String from, String to, Handler<AsyncResult<Void>> handler)
Copy a file from the pathfrom
to pathto
, asynchronously.The copy will fail if the destination already exists.
- Parameters:
from
- the path to copy fromto
- the path to copy tohandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
copy
public FileSystem copy(String from, String to)
Copy a file from the pathfrom
to pathto
, asynchronously.The copy will fail if the destination already exists.
- Parameters:
from
- the path to copy fromto
- the path to copy to- Returns:
- a reference to this, so the API can be used fluently
-
rxCopy
public io.reactivex.Completable rxCopy(String from, String to)
Copy a file from the pathfrom
to pathto
, asynchronously.The copy will fail if the destination already exists.
- Parameters:
from
- the path to copy fromto
- the path to copy to- Returns:
- a reference to this, so the API can be used fluently
-
copy
public FileSystem copy(String from, String to, CopyOptions options, Handler<AsyncResult<Void>> handler)
Copy a file from the pathfrom
to pathto
, asynchronously.- Parameters:
from
- the path to copy fromto
- the path to copy tooptions
- options describing how the file should be copiedhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
copy
public FileSystem copy(String from, String to, CopyOptions options)
Copy a file from the pathfrom
to pathto
, asynchronously.- Parameters:
from
- the path to copy fromto
- the path to copy tooptions
- options describing how the file should be copied- Returns:
- a reference to this, so the API can be used fluently
-
rxCopy
public io.reactivex.Completable rxCopy(String from, String to, CopyOptions options)
Copy a file from the pathfrom
to pathto
, asynchronously.- Parameters:
from
- the path to copy fromto
- the path to copy tooptions
- options describing how the file should be copied- Returns:
- a reference to this, so the API can be used fluently
-
copyBlocking
public FileSystem copyBlocking(String from, String to)
Blocking version ofcopy(java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
from
-to
-- Returns:
-
copyRecursive
public FileSystem copyRecursive(String from, String to, boolean recursive, Handler<AsyncResult<Void>> handler)
Copy a file from the pathfrom
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.
- Parameters:
from
- the path to copy fromto
- the path to copy torecursive
-handler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
copyRecursive
public FileSystem copyRecursive(String from, String to, boolean recursive)
Copy a file from the pathfrom
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.
- Parameters:
from
- the path to copy fromto
- the path to copy torecursive
-- Returns:
- a reference to this, so the API can be used fluently
-
rxCopyRecursive
public io.reactivex.Completable rxCopyRecursive(String from, String to, boolean recursive)
Copy a file from the pathfrom
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.
- Parameters:
from
- the path to copy fromto
- the path to copy torecursive
-- Returns:
- a reference to this, so the API can be used fluently
-
copyRecursiveBlocking
public FileSystem copyRecursiveBlocking(String from, String to, boolean recursive)
Blocking version ofcopyRecursive(java.lang.String, java.lang.String, boolean, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
from
-to
-recursive
-- Returns:
-
move
public FileSystem move(String from, String to, Handler<AsyncResult<Void>> handler)
Move a file from the pathfrom
to pathto
, asynchronously.The move will fail if the destination already exists.
- Parameters:
from
- the path to copy fromto
- the path to copy tohandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
move
public FileSystem move(String from, String to)
Move a file from the pathfrom
to pathto
, asynchronously.The move will fail if the destination already exists.
- Parameters:
from
- the path to copy fromto
- the path to copy to- Returns:
- a reference to this, so the API can be used fluently
-
rxMove
public io.reactivex.Completable rxMove(String from, String to)
Move a file from the pathfrom
to pathto
, asynchronously.The move will fail if the destination already exists.
- Parameters:
from
- the path to copy fromto
- the path to copy to- Returns:
- a reference to this, so the API can be used fluently
-
move
public FileSystem move(String from, String to, CopyOptions options, Handler<AsyncResult<Void>> handler)
Move a file from the pathfrom
to pathto
, asynchronously.- Parameters:
from
- the path to copy fromto
- the path to copy tooptions
- options describing how the file should be copiedhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
move
public FileSystem move(String from, String to, CopyOptions options)
Move a file from the pathfrom
to pathto
, asynchronously.- Parameters:
from
- the path to copy fromto
- the path to copy tooptions
- options describing how the file should be copied- Returns:
- a reference to this, so the API can be used fluently
-
rxMove
public io.reactivex.Completable rxMove(String from, String to, CopyOptions options)
Move a file from the pathfrom
to pathto
, asynchronously.- Parameters:
from
- the path to copy fromto
- the path to copy tooptions
- options describing how the file should be copied- Returns:
- a reference to this, so the API can be used fluently
-
moveBlocking
public FileSystem moveBlocking(String from, String to)
Blocking version ofmove(java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
from
-to
-- Returns:
-
truncate
public FileSystem truncate(String path, long len, Handler<AsyncResult<Void>> handler)
Truncate the file represented bypath
to lengthlen
in bytes, asynchronously.The operation will fail if the file does not exist or
len
is less thanzero
.- Parameters:
path
- the path to the filelen
- the length to truncate it tohandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
truncate
public FileSystem truncate(String path, long len)
Truncate the file represented bypath
to lengthlen
in bytes, asynchronously.The operation will fail if the file does not exist or
len
is less thanzero
.- Parameters:
path
- the path to the filelen
- the length to truncate it to- Returns:
- a reference to this, so the API can be used fluently
-
rxTruncate
public io.reactivex.Completable rxTruncate(String path, long len)
Truncate the file represented bypath
to lengthlen
in bytes, asynchronously.The operation will fail if the file does not exist or
len
is less thanzero
.- Parameters:
path
- the path to the filelen
- the length to truncate it to- Returns:
- a reference to this, so the API can be used fluently
-
truncateBlocking
public FileSystem truncateBlocking(String path, long len)
Blocking version oftruncate(java.lang.String, long, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-len
-- Returns:
-
chmod
public FileSystem chmod(String path, String perms, Handler<AsyncResult<Void>> handler)
Change the permissions on the file represented bypath
toperms
, asynchronously.The permission String takes the form rwxr-x--- as specified here.
- Parameters:
path
- the path to the fileperms
- the permissions stringhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
chmod
public FileSystem chmod(String path, String perms)
Change the permissions on the file represented bypath
toperms
, asynchronously.The permission String takes the form rwxr-x--- as specified here.
- Parameters:
path
- the path to the fileperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
rxChmod
public io.reactivex.Completable rxChmod(String path, String perms)
Change the permissions on the file represented bypath
toperms
, asynchronously.The permission String takes the form rwxr-x--- as specified here.
- Parameters:
path
- the path to the fileperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
chmodBlocking
public FileSystem chmodBlocking(String path, String perms)
Blocking version of#chmod(String, String, Handler)
- Parameters:
path
-perms
-- Returns:
-
chmodRecursive
public FileSystem chmodRecursive(String path, String perms, String dirPerms, Handler<AsyncResult<Void>> handler)
Change the permissions on the file represented bypath
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
.- Parameters:
path
- the path to the fileperms
- the permissions stringdirPerms
- the directory permissionshandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
chmodRecursive
public FileSystem chmodRecursive(String path, String perms, String dirPerms)
Change the permissions on the file represented bypath
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
.- Parameters:
path
- the path to the fileperms
- the permissions stringdirPerms
- the directory permissions- Returns:
- a reference to this, so the API can be used fluently
-
rxChmodRecursive
public io.reactivex.Completable rxChmodRecursive(String path, String perms, String dirPerms)
Change the permissions on the file represented bypath
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
.- Parameters:
path
- the path to the fileperms
- the permissions stringdirPerms
- the directory permissions- Returns:
- a reference to this, so the API can be used fluently
-
chmodRecursiveBlocking
public FileSystem chmodRecursiveBlocking(String path, String perms, String dirPerms)
Blocking version ofchmodRecursive(java.lang.String, java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-perms
-dirPerms
-- Returns:
-
chown
public FileSystem chown(String path, String user, String group, Handler<AsyncResult<Void>> handler)
Change the ownership on the file represented bypath
touser
and {code group}, asynchronously.- Parameters:
path
- the path to the fileuser
- the user name,null
will not change the user namegroup
- the user group,null
will not change the user group namehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
chown
public FileSystem chown(String path, String user, String group)
Change the ownership on the file represented bypath
touser
and {code group}, asynchronously.- Parameters:
path
- the path to the fileuser
- the user name,null
will not change the user namegroup
- the user group,null
will not change the user group name- Returns:
- a reference to this, so the API can be used fluently
-
rxChown
public io.reactivex.Completable rxChown(String path, String user, String group)
Change the ownership on the file represented bypath
touser
and {code group}, asynchronously.- Parameters:
path
- the path to the fileuser
- the user name,null
will not change the user namegroup
- the user group,null
will not change the user group name- Returns:
- a reference to this, so the API can be used fluently
-
chownBlocking
public FileSystem chownBlocking(String path, String user, String group)
Blocking version ofchown(java.lang.String, java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-user
-group
-- Returns:
-
props
public FileSystem props(String path, Handler<AsyncResult<FileProps>> handler)
Obtain properties for the file represented bypath
, asynchronously.If the file is a link, the link will be followed.
- Parameters:
path
- the path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
props
public FileSystem props(String path)
Obtain properties for the file represented bypath
, asynchronously.If the file is a link, the link will be followed.
- Parameters:
path
- the path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxProps
public io.reactivex.Single<FileProps> rxProps(String path)
Obtain properties for the file represented bypath
, asynchronously.If the file is a link, the link will be followed.
- Parameters:
path
- the path to the file- Returns:
- a reference to this, so the API can be used fluently
-
propsBlocking
public FileProps propsBlocking(String path)
Blocking version ofprops(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.file.FileProps>>)
- Parameters:
path
-- Returns:
-
lprops
public FileSystem lprops(String path, Handler<AsyncResult<FileProps>> handler)
Obtain properties for the link represented bypath
, asynchronously.The link will not be followed.
- Parameters:
path
- the path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
lprops
public FileSystem lprops(String path)
Obtain properties for the link represented bypath
, asynchronously.The link will not be followed.
- Parameters:
path
- the path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxLprops
public io.reactivex.Single<FileProps> rxLprops(String path)
Obtain properties for the link represented bypath
, asynchronously.The link will not be followed.
- Parameters:
path
- the path to the file- Returns:
- a reference to this, so the API can be used fluently
-
lpropsBlocking
public FileProps lpropsBlocking(String path)
Blocking version oflprops(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.file.FileProps>>)
- Parameters:
path
-- Returns:
-
link
public FileSystem link(String link, String existing, Handler<AsyncResult<Void>> handler)
Create a hard link on the file system fromlink
toexisting
, asynchronously.- Parameters:
link
- the linkexisting
- the link destinationhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
link
public FileSystem link(String link, String existing)
Create a hard link on the file system fromlink
toexisting
, asynchronously.- Parameters:
link
- the linkexisting
- the link destination- Returns:
- a reference to this, so the API can be used fluently
-
rxLink
public io.reactivex.Completable rxLink(String link, String existing)
Create a hard link on the file system fromlink
toexisting
, asynchronously.- Parameters:
link
- the linkexisting
- the link destination- Returns:
- a reference to this, so the API can be used fluently
-
linkBlocking
public FileSystem linkBlocking(String link, String existing)
Blocking version oflink(java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
link
-existing
-- Returns:
-
symlink
public FileSystem symlink(String link, String existing, Handler<AsyncResult<Void>> handler)
Create a symbolic link on the file system fromlink
toexisting
, asynchronously.- Parameters:
link
- the linkexisting
- the link destinationhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
symlink
public FileSystem symlink(String link, String existing)
Create a symbolic link on the file system fromlink
toexisting
, asynchronously.- Parameters:
link
- the linkexisting
- the link destination- Returns:
- a reference to this, so the API can be used fluently
-
rxSymlink
public io.reactivex.Completable rxSymlink(String link, String existing)
Create a symbolic link on the file system fromlink
toexisting
, asynchronously.- Parameters:
link
- the linkexisting
- the link destination- Returns:
- a reference to this, so the API can be used fluently
-
symlinkBlocking
public FileSystem symlinkBlocking(String link, String existing)
Blocking version oflink(java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
link
-existing
-- Returns:
-
unlink
public FileSystem unlink(String link, Handler<AsyncResult<Void>> handler)
Unlinks the link on the file system represented by the pathlink
, asynchronously.- Parameters:
link
- the linkhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
unlink
public FileSystem unlink(String link)
Unlinks the link on the file system represented by the pathlink
, asynchronously.- Parameters:
link
- the link- Returns:
- a reference to this, so the API can be used fluently
-
rxUnlink
public io.reactivex.Completable rxUnlink(String link)
Unlinks the link on the file system represented by the pathlink
, asynchronously.- Parameters:
link
- the link- Returns:
- a reference to this, so the API can be used fluently
-
unlinkBlocking
public FileSystem unlinkBlocking(String link)
Blocking version ofunlink(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
link
-- Returns:
-
readSymlink
public FileSystem readSymlink(String link, Handler<AsyncResult<String>> handler)
Returns the path representing the file that the symbolic link specified bylink
points to, asynchronously.- Parameters:
link
- the linkhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
readSymlink
public FileSystem readSymlink(String link)
Returns the path representing the file that the symbolic link specified bylink
points to, asynchronously.- Parameters:
link
- the link- Returns:
- a reference to this, so the API can be used fluently
-
rxReadSymlink
public io.reactivex.Single<String> rxReadSymlink(String link)
Returns the path representing the file that the symbolic link specified bylink
points to, asynchronously.- Parameters:
link
- the link- Returns:
- a reference to this, so the API can be used fluently
-
readSymlinkBlocking
public String readSymlinkBlocking(String link)
Blocking version ofreadSymlink(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>)
- Parameters:
link
-- Returns:
-
delete
public FileSystem delete(String path, Handler<AsyncResult<Void>> handler)
Deletes the file represented by the specifiedpath
, asynchronously.- Parameters:
path
- path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
delete
public FileSystem delete(String path)
Deletes the file represented by the specifiedpath
, asynchronously.- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxDelete
public io.reactivex.Completable rxDelete(String path)
Deletes the file represented by the specifiedpath
, asynchronously.- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
deleteBlocking
public FileSystem deleteBlocking(String path)
Blocking version ofdelete(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-- Returns:
-
deleteRecursive
public FileSystem deleteRecursive(String path, boolean recursive, Handler<AsyncResult<Void>> handler)
Deletes the file represented by the specifiedpath
, asynchronously.If the path represents a directory and
recursive = true
then the directory and its contents will be deleted recursively.- Parameters:
path
- path to the filerecursive
- delete recursively?handler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
deleteRecursive
public FileSystem deleteRecursive(String path, boolean recursive)
Deletes the file represented by the specifiedpath
, asynchronously.If the path represents a directory and
recursive = true
then the directory and its contents will be deleted recursively.- Parameters:
path
- path to the filerecursive
- delete recursively?- Returns:
- a reference to this, so the API can be used fluently
-
rxDeleteRecursive
public io.reactivex.Completable rxDeleteRecursive(String path, boolean recursive)
Deletes the file represented by the specifiedpath
, asynchronously.If the path represents a directory and
recursive = true
then the directory and its contents will be deleted recursively.- Parameters:
path
- path to the filerecursive
- delete recursively?- Returns:
- a reference to this, so the API can be used fluently
-
deleteRecursiveBlocking
public FileSystem deleteRecursiveBlocking(String path, boolean recursive)
Blocking version ofdeleteRecursive(java.lang.String, boolean, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-recursive
-- Returns:
-
mkdir
public FileSystem mkdir(String path, Handler<AsyncResult<Void>> handler)
Create the directory represented bypath
, asynchronously.The operation will fail if the directory already exists.
- Parameters:
path
- path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
mkdir
public FileSystem mkdir(String path)
Create the directory represented bypath
, asynchronously.The operation will fail if the directory already exists.
- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxMkdir
public io.reactivex.Completable rxMkdir(String path)
Create the directory represented bypath
, asynchronously.The operation will fail if the directory already exists.
- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
mkdirBlocking
public FileSystem mkdirBlocking(String path)
Blocking version ofmkdir(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-- Returns:
-
mkdir
public FileSystem mkdir(String path, String perms, Handler<AsyncResult<Void>> handler)
Create the directory represented bypath
, 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.
- Parameters:
path
- path to the fileperms
- the permissions stringhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
mkdir
public FileSystem mkdir(String path, String perms)
Create the directory represented bypath
, 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.
- Parameters:
path
- path to the fileperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
rxMkdir
public io.reactivex.Completable rxMkdir(String path, String perms)
Create the directory represented bypath
, 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.
- Parameters:
path
- path to the fileperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
mkdirBlocking
public FileSystem mkdirBlocking(String path, String perms)
Blocking version ofmkdir(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-perms
-- Returns:
-
mkdirs
public FileSystem mkdirs(String path, Handler<AsyncResult<Void>> handler)
Create the directory represented bypath
and any non existent parents, asynchronously.The operation will fail if the
path
already exists but is not a directory.- Parameters:
path
- path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
mkdirs
public FileSystem mkdirs(String path)
Create the directory represented bypath
and any non existent parents, asynchronously.The operation will fail if the
path
already exists but is not a directory.- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxMkdirs
public io.reactivex.Completable rxMkdirs(String path)
Create the directory represented bypath
and any non existent parents, asynchronously.The operation will fail if the
path
already exists but is not a directory.- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
mkdirsBlocking
public FileSystem mkdirsBlocking(String path)
Blocking version ofmkdirs(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-- Returns:
-
mkdirs
public FileSystem mkdirs(String path, String perms, Handler<AsyncResult<Void>> handler)
Create the directory represented bypath
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
path
already exists but is not a directory.- Parameters:
path
- path to the fileperms
- the permissions stringhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
mkdirs
public FileSystem mkdirs(String path, String perms)
Create the directory represented bypath
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
path
already exists but is not a directory.- Parameters:
path
- path to the fileperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
rxMkdirs
public io.reactivex.Completable rxMkdirs(String path, String perms)
Create the directory represented bypath
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
path
already exists but is not a directory.- Parameters:
path
- path to the fileperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
mkdirsBlocking
public FileSystem mkdirsBlocking(String path, String perms)
Blocking version ofmkdirs(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-perms
-- Returns:
-
readDir
public FileSystem readDir(String path, Handler<AsyncResult<List<String>>> handler)
Read the contents of the directory specified bypath
, asynchronously.The result is an array of String representing the paths of the files inside the directory.
- Parameters:
path
- path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
readDir
public FileSystem readDir(String path)
Read the contents of the directory specified bypath
, asynchronously.The result is an array of String representing the paths of the files inside the directory.
- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxReadDir
public io.reactivex.Single<List<String>> rxReadDir(String path)
Read the contents of the directory specified bypath
, asynchronously.The result is an array of String representing the paths of the files inside the directory.
- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
readDirBlocking
public List<String> readDirBlocking(String path)
Blocking version ofreadDir(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.lang.String>>>)
- Parameters:
path
-- Returns:
-
readDir
public FileSystem readDir(String path, String filter, Handler<AsyncResult<List<String>>> handler)
Read the contents of the directory specified bypath
, asynchronously.The parameter
filter
is a regular expression. Iffilter
is specified then only the paths that match @{filter}will be returned.The result is an array of String representing the paths of the files inside the directory.
- Parameters:
path
- path to the directoryfilter
- the filter expressionhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
readDir
public FileSystem readDir(String path, String filter)
Read the contents of the directory specified bypath
, asynchronously.The parameter
filter
is a regular expression. Iffilter
is specified then only the paths that match @{filter}will be returned.The result is an array of String representing the paths of the files inside the directory.
- Parameters:
path
- path to the directoryfilter
- the filter expression- Returns:
- a reference to this, so the API can be used fluently
-
rxReadDir
public io.reactivex.Single<List<String>> rxReadDir(String path, String filter)
Read the contents of the directory specified bypath
, asynchronously.The parameter
filter
is a regular expression. Iffilter
is specified then only the paths that match @{filter}will be returned.The result is an array of String representing the paths of the files inside the directory.
- Parameters:
path
- path to the directoryfilter
- the filter expression- Returns:
- a reference to this, so the API can be used fluently
-
readDirBlocking
public List<String> readDirBlocking(String path, String filter)
Blocking version ofreadDir(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.lang.String>>>)
- Parameters:
path
-filter
-- Returns:
-
readFile
public FileSystem readFile(String path, Handler<AsyncResult<Buffer>> handler)
Reads the entire file as represented by the pathpath
as a , asynchronously.Do not use this method to read very large files or you risk running out of available RAM.
- Parameters:
path
- path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
readFile
public FileSystem readFile(String path)
Reads the entire file as represented by the pathpath
as a , asynchronously.Do not use this method to read very large files or you risk running out of available RAM.
- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxReadFile
public io.reactivex.Single<Buffer> rxReadFile(String path)
Reads the entire file as represented by the pathpath
as a , asynchronously.Do not use this method to read very large files or you risk running out of available RAM.
- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
readFileBlocking
public Buffer readFileBlocking(String path)
Blocking version ofreadFile(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.buffer.Buffer>>)
- Parameters:
path
-- Returns:
-
writeFile
public FileSystem writeFile(String path, Buffer data, Handler<AsyncResult<Void>> handler)
Creates the file, and writes the specifiedBuffer data
to the file represented by the pathpath
, asynchronously.- Parameters:
path
- path to the filedata
-handler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
writeFile
public FileSystem writeFile(String path, Buffer data)
Creates the file, and writes the specifiedBuffer data
to the file represented by the pathpath
, asynchronously.- Parameters:
path
- path to the filedata
-- Returns:
- a reference to this, so the API can be used fluently
-
rxWriteFile
public io.reactivex.Completable rxWriteFile(String path, Buffer data)
Creates the file, and writes the specifiedBuffer data
to the file represented by the pathpath
, asynchronously.- Parameters:
path
- path to the filedata
-- Returns:
- a reference to this, so the API can be used fluently
-
writeFileBlocking
public FileSystem writeFileBlocking(String path, Buffer data)
Blocking version ofwriteFile(java.lang.String, io.vertx.reactivex.core.buffer.Buffer, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-data
-- Returns:
-
open
public FileSystem open(String path, OpenOptions options, Handler<AsyncResult<AsyncFile>> handler)
Open the file represented bypath
, asynchronously.The file is opened for both reading and writing. If the file does not already exist it will be created.
- Parameters:
path
- path to the fileoptions
- options describing how the file should be openedhandler
-- Returns:
- a reference to this, so the API can be used fluently
-
open
public FileSystem open(String path, OpenOptions options)
Open the file represented bypath
, asynchronously.The file is opened for both reading and writing. If the file does not already exist it will be created.
- Parameters:
path
- path to the fileoptions
- options describing how the file should be opened- Returns:
- a reference to this, so the API can be used fluently
-
rxOpen
public io.reactivex.Single<AsyncFile> rxOpen(String path, OpenOptions options)
Open the file represented bypath
, asynchronously.The file is opened for both reading and writing. If the file does not already exist it will be created.
- Parameters:
path
- path to the fileoptions
- options describing how the file should be opened- Returns:
- a reference to this, so the API can be used fluently
-
openBlocking
public AsyncFile openBlocking(String path, OpenOptions options)
Blocking version ofopen(java.lang.String, io.vertx.core.file.OpenOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.file.AsyncFile>>)
- Parameters:
path
-options
-- Returns:
-
createFile
public FileSystem createFile(String path, Handler<AsyncResult<Void>> handler)
Creates an empty file with the specifiedpath
, asynchronously.- Parameters:
path
- path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
createFile
public FileSystem createFile(String path)
Creates an empty file with the specifiedpath
, asynchronously.- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxCreateFile
public io.reactivex.Completable rxCreateFile(String path)
Creates an empty file with the specifiedpath
, asynchronously.- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
createFileBlocking
public FileSystem createFileBlocking(String path)
Blocking version ofcreateFile(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-- Returns:
-
createFile
public FileSystem createFile(String path, String perms, Handler<AsyncResult<Void>> handler)
Creates an empty file with the specifiedpath
and permissionsperms
, asynchronously.- Parameters:
path
- path to the fileperms
- the permissions stringhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
createFile
public FileSystem createFile(String path, String perms)
Creates an empty file with the specifiedpath
and permissionsperms
, asynchronously.- Parameters:
path
- path to the fileperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
rxCreateFile
public io.reactivex.Completable rxCreateFile(String path, String perms)
Creates an empty file with the specifiedpath
and permissionsperms
, asynchronously.- Parameters:
path
- path to the fileperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
createFileBlocking
public FileSystem createFileBlocking(String path, String perms)
Blocking version ofcreateFile(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
- Parameters:
path
-perms
-- Returns:
-
exists
public FileSystem exists(String path, Handler<AsyncResult<Boolean>> handler)
Determines whether the file as specified by the pathpath
exists, asynchronously.- Parameters:
path
- path to the filehandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
exists
public FileSystem exists(String path)
Determines whether the file as specified by the pathpath
exists, asynchronously.- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
rxExists
public io.reactivex.Single<Boolean> rxExists(String path)
Determines whether the file as specified by the pathpath
exists, asynchronously.- Parameters:
path
- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
existsBlocking
public boolean existsBlocking(String path)
Blocking version ofexists(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)
- Parameters:
path
-- Returns:
-
fsProps
public FileSystem fsProps(String path, Handler<AsyncResult<FileSystemProps>> handler)
Returns properties of the file-system being used by the specifiedpath
, asynchronously.- Parameters:
path
- path to anywhere on the filesystemhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
fsProps
public FileSystem fsProps(String path)
Returns properties of the file-system being used by the specifiedpath
, asynchronously.- Parameters:
path
- path to anywhere on the filesystem- Returns:
- a reference to this, so the API can be used fluently
-
rxFsProps
public io.reactivex.Single<FileSystemProps> rxFsProps(String path)
Returns properties of the file-system being used by the specifiedpath
, asynchronously.- Parameters:
path
- path to anywhere on the filesystem- Returns:
- a reference to this, so the API can be used fluently
-
fsPropsBlocking
public FileSystemProps fsPropsBlocking(String path)
Blocking version offsProps(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.core.file.FileSystemProps>>)
- Parameters:
path
-- Returns:
-
createTempDirectory
public FileSystem createTempDirectory(String prefix, Handler<AsyncResult<String>> handler)
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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
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
-
createTempDirectory
public FileSystem createTempDirectory(String prefix)
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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
prefix
- the prefix string to be used in generating the directory's name; may benull
- Returns:
- a reference to this, so the API can be used fluently
-
rxCreateTempDirectory
public io.reactivex.Single<String> rxCreateTempDirectory(String prefix)
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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
prefix
- the prefix string to be used in generating the directory's name; may benull
- Returns:
- a reference to this, so the API can be used fluently
-
createTempDirectoryBlocking
public String createTempDirectoryBlocking(String prefix)
Blocking version ofcreateTempDirectory(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>)
- Parameters:
prefix
-- Returns:
-
createTempDirectory
public FileSystem createTempDirectory(String prefix, String perms, Handler<AsyncResult<String>> handler)
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
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
prefix
- the prefix string to be used in generating the directory's name; may benull
perms
- the permissions stringhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
createTempDirectory
public FileSystem createTempDirectory(String prefix, String perms)
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
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
prefix
- the prefix string to be used in generating the directory's name; may benull
perms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
rxCreateTempDirectory
public io.reactivex.Single<String> rxCreateTempDirectory(String prefix, String perms)
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
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
prefix
- the prefix string to be used in generating the directory's name; may benull
perms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
createTempDirectoryBlocking
public String createTempDirectoryBlocking(String prefix, String perms)
Blocking version ofcreateTempDirectory(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>)
- Parameters:
prefix
-perms
-- Returns:
-
createTempDirectory
public FileSystem createTempDirectory(String dir, String prefix, String perms, Handler<AsyncResult<String>> handler)
Creates a new directory in the directory provided by the pathpath
, using the given prefix to generate its name, asynchronously.The new directory will be created with permissions as specified by
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
dir
- the path to directory in which to create the directoryprefix
- the prefix string to be used in generating the directory's name; may benull
perms
- the permissions stringhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
createTempDirectory
public FileSystem createTempDirectory(String dir, String prefix, String perms)
Creates a new directory in the directory provided by the pathpath
, using the given prefix to generate its name, asynchronously.The new directory will be created with permissions as specified by
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
dir
- the path to directory in which to create the directoryprefix
- the prefix string to be used in generating the directory's name; may benull
perms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
rxCreateTempDirectory
public io.reactivex.Single<String> rxCreateTempDirectory(String dir, String prefix, String perms)
Creates a new directory in the directory provided by the pathpath
, using the given prefix to generate its name, asynchronously.The new directory will be created with permissions as specified by
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
dir
- the path to directory in which to create the directoryprefix
- the prefix string to be used in generating the directory's name; may benull
perms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
createTempDirectoryBlocking
public String createTempDirectoryBlocking(String dir, String prefix, String perms)
Blocking version ofcreateTempDirectory(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>)
- Parameters:
dir
-prefix
-perms
-- Returns:
-
createTempFile
public FileSystem createTempFile(String prefix, String suffix, Handler<AsyncResult<String>> handler)
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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
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 benull
, in which case ".tmp
" is usedhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
createTempFile
public FileSystem createTempFile(String prefix, String suffix)
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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
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 benull
, in which case ".tmp
" is used- Returns:
- a reference to this, so the API can be used fluently
-
rxCreateTempFile
public io.reactivex.Single<String> rxCreateTempFile(String prefix, String suffix)
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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
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 benull
, in which case ".tmp
" is used- Returns:
- a reference to this, so the API can be used fluently
-
createTempFileBlocking
public String createTempFileBlocking(String prefix, String suffix)
Blocking version ofcreateTempFile(java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>)
- Parameters:
prefix
-suffix
-- Returns:
-
createTempFile
public FileSystem createTempFile(String prefix, String suffix, String perms, Handler<AsyncResult<String>> handler)
Creates a new file in the directory provided by the pathdir
, 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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
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 benull
, in which case ".tmp
" is usedperms
-handler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
createTempFile
public FileSystem createTempFile(String prefix, String suffix, String perms)
Creates a new file in the directory provided by the pathdir
, 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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
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 benull
, in which case ".tmp
" is usedperms
-- Returns:
- a reference to this, so the API can be used fluently
-
rxCreateTempFile
public io.reactivex.Single<String> rxCreateTempFile(String prefix, String suffix, String perms)
Creates a new file in the directory provided by the pathdir
, 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.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
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 benull
, in which case ".tmp
" is usedperms
-- Returns:
- a reference to this, so the API can be used fluently
-
createTempFileBlocking
public String createTempFileBlocking(String prefix, String suffix, String perms)
Blocking version ofcreateTempFile(java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>)
- Parameters:
prefix
-suffix
-perms
-- Returns:
-
createTempFile
public FileSystem createTempFile(String dir, String prefix, String suffix, String perms, Handler<AsyncResult<String>> handler)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.The new directory will be created with permissions as specified by
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
dir
- the path to directory in which to create the directoryprefix
- 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 benull
, in which case ".tmp
" is usedperms
- the permissions stringhandler
- the handler that will be called on completion- Returns:
- a reference to this, so the API can be used fluently
-
createTempFile
public FileSystem createTempFile(String dir, String prefix, String suffix, String perms)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.The new directory will be created with permissions as specified by
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
dir
- the path to directory in which to create the directoryprefix
- 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 benull
, in which case ".tmp
" is usedperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
rxCreateTempFile
public io.reactivex.Single<String> rxCreateTempFile(String dir, String prefix, String suffix, String perms)
Creates a new file in the directory provided by the pathdir
, using the given prefix and suffix to generate its name, asynchronously.The new directory will be created with permissions as specified by
The permission String takes the form rwxr-x--- as specified in here.perms
.As with the
File.createTempFile
methods, this method is only part of a temporary-file facility.ARuntime
, or theFile
mechanism may be used to delete the directory automatically.- Parameters:
dir
- the path to directory in which to create the directoryprefix
- 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 benull
, in which case ".tmp
" is usedperms
- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
createTempFileBlocking
public String createTempFileBlocking(String dir, String prefix, String suffix, String perms)
Blocking version ofcreateTempFile(java.lang.String, java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>)
- Parameters:
dir
-prefix
-suffix
-perms
-- Returns:
-
newInstance
public static FileSystem newInstance(FileSystem arg)
-
-