Class FileSystem
- java.lang.Object
-
- io.vertx.mutiny.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
xxxBlockingand 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 theoriginalnon Mutiny-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(io.vertx.core.file.FileSystem delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>chmod(String path, String perms)Change the permissions on the file represented bypathtoperms, asynchronously.VoidchmodAndAwait(String path, String perms)Blocking variant ofchmod(String,String).FileSystemchmodBlocking(String path, String perms)io.smallrye.mutiny.Uni<Void>chmodRecursive(String path, String perms, String dirPerms)Change the permissions on the file represented bypathtoperms, asynchronously.VoidchmodRecursiveAndAwait(String path, String perms, String dirPerms)Blocking variant ofchmodRecursive(String,String,String).FileSystemchmodRecursiveBlocking(String path, String perms, String dirPerms)io.smallrye.mutiny.Uni<Void>chown(String path, String user, String group)Change the ownership on the file represented bypathtouserand {code group}, asynchronously.VoidchownAndAwait(String path, String user, String group)Blocking variant ofchown(String,String,String).FileSystemchownBlocking(String path, String user, String group)io.smallrye.mutiny.Uni<Void>copy(String from, String to)Copy a file from the pathfromto pathto, asynchronously.io.smallrye.mutiny.Uni<Void>copy(String from, String to, io.vertx.core.file.CopyOptions options)Copy a file from the pathfromto pathto, asynchronously.VoidcopyAndAwait(String from, String to)Blocking variant ofcopy(String,String).VoidcopyAndAwait(String from, String to, io.vertx.core.file.CopyOptions options)Blocking variant ofcopy(String,String,CopyOptions).FileSystemcopyBlocking(String from, String to)io.smallrye.mutiny.Uni<Void>copyRecursive(String from, String to, boolean recursive)Copy a file from the pathfromto pathto, asynchronously.VoidcopyRecursiveAndAwait(String from, String to, boolean recursive)Blocking variant ofcopyRecursive(String,String,boolean).FileSystemcopyRecursiveBlocking(String from, String to, boolean recursive)io.smallrye.mutiny.Uni<Void>createFile(String path)Creates an empty file with the specifiedpath, asynchronously.io.smallrye.mutiny.Uni<Void>createFile(String path, String perms)Creates an empty file with the specifiedpathand permissionsperms, asynchronously.VoidcreateFileAndAwait(String path)Blocking variant ofcreateFile(String).VoidcreateFileAndAwait(String path, String perms)Blocking variant ofcreateFile(String,String).FileSystemcreateFileBlocking(String path)FileSystemcreateFileBlocking(String path, String perms)io.smallrye.mutiny.Uni<String>createTempDirectory(String prefix)Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.io.smallrye.mutiny.Uni<String>createTempDirectory(String prefix, String perms)Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.io.smallrye.mutiny.Uni<String>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.StringcreateTempDirectoryAndAwait(String prefix)Blocking variant ofcreateTempDirectory(String).StringcreateTempDirectoryAndAwait(String prefix, String perms)Blocking variant ofcreateTempDirectory(String,String).StringcreateTempDirectoryAndAwait(String dir, String prefix, String perms)Blocking variant ofcreateTempDirectory(String,String,String).StringcreateTempDirectoryBlocking(String prefix)StringcreateTempDirectoryBlocking(String prefix, String perms)StringcreateTempDirectoryBlocking(String dir, String prefix, String perms)io.smallrye.mutiny.Uni<String>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.io.smallrye.mutiny.Uni<String>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.io.smallrye.mutiny.Uni<String>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.StringcreateTempFileAndAwait(String prefix, String suffix)Blocking variant ofcreateTempFile(String,String).StringcreateTempFileAndAwait(String prefix, String suffix, String perms)Blocking variant ofcreateTempFile(String,String,String).StringcreateTempFileAndAwait(String dir, String prefix, String suffix, String perms)Blocking variant ofcreateTempFile(String,String,String,String).StringcreateTempFileBlocking(String prefix, String suffix)StringcreateTempFileBlocking(String prefix, String suffix, String perms)StringcreateTempFileBlocking(String dir, String prefix, String suffix, String perms)io.smallrye.mutiny.Uni<Void>delete(String path)Deletes the file represented by the specifiedpath, asynchronously.VoiddeleteAndAwait(String path)Blocking variant ofdelete(String).FileSystemdeleteBlocking(String path)io.smallrye.mutiny.Uni<Void>deleteRecursive(String path, boolean recursive)Deletes the file represented by the specifiedpath, asynchronously.VoiddeleteRecursiveAndAwait(String path, boolean recursive)Blocking variant ofdeleteRecursive(String,boolean).FileSystemdeleteRecursiveBlocking(String path, boolean recursive)booleanequals(Object o)io.smallrye.mutiny.Uni<Boolean>exists(String path)Determines whether the file as specified by the pathpathexists, asynchronously.BooleanexistsAndAwait(String path)Blocking variant ofexists(String).booleanexistsBlocking(String path)io.smallrye.mutiny.Uni<FileSystemProps>fsProps(String path)Returns properties of the file-system being used by the specifiedpath, asynchronously.FileSystemPropsfsPropsAndAwait(String path)Blocking variant offsProps(String).FileSystemPropsfsPropsBlocking(String path)io.vertx.core.file.FileSystemgetDelegate()inthashCode()io.smallrye.mutiny.Uni<Void>link(String link, String existing)Create a hard link on the file system fromlinktoexisting, asynchronously.VoidlinkAndAwait(String link, String existing)Blocking variant oflink(String,String).FileSystemlinkBlocking(String link, String existing)io.smallrye.mutiny.Uni<FileProps>lprops(String path)Obtain properties for the link represented bypath, asynchronously.FilePropslpropsAndAwait(String path)Blocking variant oflprops(String).FilePropslpropsBlocking(String path)io.smallrye.mutiny.Uni<Void>mkdir(String path)Create the directory represented bypath, asynchronously.io.smallrye.mutiny.Uni<Void>mkdir(String path, String perms)Create the directory represented bypath, asynchronously.VoidmkdirAndAwait(String path)Blocking variant ofmkdir(String).VoidmkdirAndAwait(String path, String perms)Blocking variant ofmkdir(String,String).FileSystemmkdirBlocking(String path)FileSystemmkdirBlocking(String path, String perms)io.smallrye.mutiny.Uni<Void>mkdirs(String path)Create the directory represented bypathand any non existent parents, asynchronously.io.smallrye.mutiny.Uni<Void>mkdirs(String path, String perms)Create the directory represented bypathand any non existent parents, asynchronously.VoidmkdirsAndAwait(String path)Blocking variant ofmkdirs(String).VoidmkdirsAndAwait(String path, String perms)Blocking variant ofmkdirs(String,String).FileSystemmkdirsBlocking(String path)FileSystemmkdirsBlocking(String path, String perms)io.smallrye.mutiny.Uni<Void>move(String from, String to)Move a file from the pathfromto pathto, asynchronously.io.smallrye.mutiny.Uni<Void>move(String from, String to, io.vertx.core.file.CopyOptions options)Move a file from the pathfromto pathto, asynchronously.VoidmoveAndAwait(String from, String to)Blocking variant ofmove(String,String).VoidmoveAndAwait(String from, String to, io.vertx.core.file.CopyOptions options)Blocking variant ofmove(String,String,CopyOptions).FileSystemmoveBlocking(String from, String to)static FileSystemnewInstance(io.vertx.core.file.FileSystem arg)io.smallrye.mutiny.Uni<AsyncFile>open(String path, io.vertx.core.file.OpenOptions options)Open the file represented bypath, asynchronously.AsyncFileopenAndAwait(String path, io.vertx.core.file.OpenOptions options)Blocking variant ofopen(String,OpenOptions).AsyncFileopenBlocking(String path, io.vertx.core.file.OpenOptions options)io.smallrye.mutiny.Uni<FileProps>props(String path)Obtain properties for the file represented bypath, asynchronously.FilePropspropsAndAwait(String path)Blocking variant ofprops(String).FilePropspropsBlocking(String path)io.smallrye.mutiny.Uni<List<String>>readDir(String path)Read the contents of the directory specified bypath, asynchronously.io.smallrye.mutiny.Uni<List<String>>readDir(String path, String filter)Read the contents of the directory specified bypath, asynchronously.List<String>readDirAndAwait(String path)Blocking variant ofreadDir(String).List<String>readDirAndAwait(String path, String filter)Blocking variant ofreadDir(String,String).List<String>readDirBlocking(String path)List<String>readDirBlocking(String path, String filter)io.smallrye.mutiny.Uni<Buffer>readFile(String path)Reads the entire file as represented by the pathpathas a , asynchronously.BufferreadFileAndAwait(String path)Blocking variant ofreadFile(String).BufferreadFileBlocking(String path)io.smallrye.mutiny.Uni<String>readSymlink(String link)Returns the path representing the file that the symbolic link specified bylinkpoints to, asynchronously.StringreadSymlinkAndAwait(String link)Blocking variant ofreadSymlink(String).StringreadSymlinkBlocking(String link)io.smallrye.mutiny.Uni<Void>symlink(String link, String existing)Create a symbolic link on the file system fromlinktoexisting, asynchronously.VoidsymlinkAndAwait(String link, String existing)Blocking variant ofsymlink(String,String).FileSystemsymlinkBlocking(String link, String existing)StringtoString()io.smallrye.mutiny.Uni<Void>truncate(String path, long len)Truncate the file represented bypathto lengthlenin bytes, asynchronously.VoidtruncateAndAwait(String path, long len)Blocking variant oftruncate(String,long).FileSystemtruncateBlocking(String path, long len)io.smallrye.mutiny.Uni<Void>unlink(String link)Unlinks the link on the file system represented by the pathlink, asynchronously.VoidunlinkAndAwait(String link)Blocking variant ofunlink(String).FileSystemunlinkBlocking(String link)io.smallrye.mutiny.Uni<Void>writeFile(String path, Buffer data)Creates the file, and writes the specifiedBuffer datato the file represented by the pathpath, asynchronously.VoidwriteFileAndAwait(String path, Buffer data)Blocking variant ofwriteFile(String,io.vertx.mutiny.core.buffer.Buffer).FileSystemwriteFileBlocking(String path, Buffer data)
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<FileSystem> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public io.vertx.core.file.FileSystem getDelegate()
-
copy
public io.smallrye.mutiny.Uni<Void> copy(String from, String to)
Copy a file from the pathfromto pathto, asynchronously.The copy will fail if the destination already exists.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
from- the path to copy fromto- the path to copy to- Returns:
- a reference to this, so the API can be used fluently
-
copyAndAwait
public Void copyAndAwait(String from, String to)
Blocking variant ofcopy(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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 io.smallrye.mutiny.Uni<Void> copy(String from, String to, io.vertx.core.file.CopyOptions options)
Copy a file from the pathfromto pathto, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- 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
-
copyAndAwait
public Void copyAndAwait(String from, String to, io.vertx.core.file.CopyOptions options)
Blocking variant ofcopy(String,String,CopyOptions).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
from-to-- Returns:
-
copyRecursive
public io.smallrye.mutiny.Uni<Void> copyRecursive(String from, String to, boolean recursive)
Copy a file from the pathfromto pathto, asynchronously.If
recursiveistrueandfromrepresents 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.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
from- the path to copy fromto- the path to copy torecursive-- Returns:
- a reference to this, so the API can be used fluently
-
copyRecursiveAndAwait
public Void copyRecursiveAndAwait(String from, String to, boolean recursive)
Blocking variant ofcopyRecursive(String,String,boolean).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
from-to-recursive-- Returns:
-
move
public io.smallrye.mutiny.Uni<Void> move(String from, String to)
Move a file from the pathfromto pathto, asynchronously.The move will fail if the destination already exists.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
from- the path to copy fromto- the path to copy to- Returns:
- a reference to this, so the API can be used fluently
-
moveAndAwait
public Void moveAndAwait(String from, String to)
Blocking variant ofmove(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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 io.smallrye.mutiny.Uni<Void> move(String from, String to, io.vertx.core.file.CopyOptions options)
Move a file from the pathfromto pathto, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- 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
-
moveAndAwait
public Void moveAndAwait(String from, String to, io.vertx.core.file.CopyOptions options)
Blocking variant ofmove(String,String,CopyOptions).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
from-to-- Returns:
-
truncate
public io.smallrye.mutiny.Uni<Void> truncate(String path, long len)
Truncate the file represented bypathto lengthlenin bytes, asynchronously.The operation will fail if the file does not exist or
lenis less thanzero.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- 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
-
truncateAndAwait
public Void truncateAndAwait(String path, long len)
Blocking variant oftruncate(String,long).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-len-- Returns:
-
chmod
public io.smallrye.mutiny.Uni<Void> chmod(String path, String perms)
Change the permissions on the file represented bypathtoperms, asynchronously.The permission String takes the form rwxr-x--- as specified here.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- the path to the fileperms- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
chmodAndAwait
public Void chmodAndAwait(String path, String perms)
Blocking variant ofchmod(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-perms-- Returns:
-
chmodRecursive
public io.smallrye.mutiny.Uni<Void> chmodRecursive(String path, String perms, String dirPerms)
Change the permissions on the file represented bypathtoperms, 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.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- 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
-
chmodRecursiveAndAwait
public Void chmodRecursiveAndAwait(String path, String perms, String dirPerms)
Blocking variant ofchmodRecursive(String,String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-perms-dirPerms-- Returns:
-
chown
public io.smallrye.mutiny.Uni<Void> chown(String path, String user, String group)
Change the ownership on the file represented bypathtouserand {code group}, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- the path to the fileuser- the user name,nullwill not change the user namegroup- the user group,nullwill not change the user group name- Returns:
- a reference to this, so the API can be used fluently
-
chownAndAwait
public Void chownAndAwait(String path, String user, String group)
Blocking variant ofchown(String,String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- the path to the fileuser- the user name,nullwill not change the user namegroup- the user group,nullwill 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)
- Parameters:
path-user-group-- Returns:
-
props
public io.smallrye.mutiny.Uni<FileProps> props(String path)
Obtain properties for the file represented bypath, asynchronously.If the file is a link, the link will be followed.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- the path to the file- Returns:
- a reference to this, so the API can be used fluently
-
propsAndAwait
public FileProps propsAndAwait(String path)
Blocking variant ofprops(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- the path to the file- Returns:
- a reference to this, so the API can be used fluently
-
lprops
public io.smallrye.mutiny.Uni<FileProps> lprops(String path)
Obtain properties for the link represented bypath, asynchronously.The link will not be followed.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- the path to the file- Returns:
- a reference to this, so the API can be used fluently
-
lpropsAndAwait
public FileProps lpropsAndAwait(String path)
Blocking variant oflprops(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- the path to the file- Returns:
- a reference to this, so the API can be used fluently
-
link
public io.smallrye.mutiny.Uni<Void> link(String link, String existing)
Create a hard link on the file system fromlinktoexisting, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
link- the linkexisting- the link destination- Returns:
- a reference to this, so the API can be used fluently
-
linkAndAwait
public Void linkAndAwait(String link, String existing)
Blocking variant oflink(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
link-existing-- Returns:
-
symlink
public io.smallrye.mutiny.Uni<Void> symlink(String link, String existing)
Create a symbolic link on the file system fromlinktoexisting, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
link- the linkexisting- the link destination- Returns:
- a reference to this, so the API can be used fluently
-
symlinkAndAwait
public Void symlinkAndAwait(String link, String existing)
Blocking variant ofsymlink(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
link-existing-- Returns:
-
unlink
public io.smallrye.mutiny.Uni<Void> unlink(String link)
Unlinks the link on the file system represented by the pathlink, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
link- the link- Returns:
- a reference to this, so the API can be used fluently
-
unlinkAndAwait
public Void unlinkAndAwait(String link)
Blocking variant ofunlink(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
link- the link- Returns:
- a reference to this, so the API can be used fluently
-
unlinkBlocking
public FileSystem unlinkBlocking(String link)
- Parameters:
link-- Returns:
-
readSymlink
public io.smallrye.mutiny.Uni<String> readSymlink(String link)
Returns the path representing the file that the symbolic link specified bylinkpoints to, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
link- the link- Returns:
- a reference to this, so the API can be used fluently
-
readSymlinkAndAwait
public String readSymlinkAndAwait(String link)
Blocking variant ofreadSymlink(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
link- the link- Returns:
- a reference to this, so the API can be used fluently
-
delete
public io.smallrye.mutiny.Uni<Void> delete(String path)
Deletes the file represented by the specifiedpath, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
deleteAndAwait
public Void deleteAndAwait(String path)
Blocking variant ofdelete(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
deleteBlocking
public FileSystem deleteBlocking(String path)
- Parameters:
path-- Returns:
-
deleteRecursive
public io.smallrye.mutiny.Uni<Void> deleteRecursive(String path, boolean recursive)
Deletes the file represented by the specifiedpath, asynchronously.If the path represents a directory and
recursive = truethen the directory and its contents will be deleted recursively.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the filerecursive- delete recursively?- Returns:
- a reference to this, so the API can be used fluently
-
deleteRecursiveAndAwait
public Void deleteRecursiveAndAwait(String path, boolean recursive)
Blocking variant ofdeleteRecursive(String,boolean).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-recursive-- Returns:
-
mkdir
public io.smallrye.mutiny.Uni<Void> mkdir(String path)
Create the directory represented bypath, asynchronously.The operation will fail if the directory already exists.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
mkdirAndAwait
public Void mkdirAndAwait(String path)
Blocking variant ofmkdir(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
mkdirBlocking
public FileSystem mkdirBlocking(String path)
- Parameters:
path-- Returns:
-
mkdir
public io.smallrye.mutiny.Uni<Void> 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.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the fileperms- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
mkdirAndAwait
public Void mkdirAndAwait(String path, String perms)
Blocking variant ofmkdir(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-perms-- Returns:
-
mkdirs
public io.smallrye.mutiny.Uni<Void> mkdirs(String path)
Create the directory represented bypathand any non existent parents, asynchronously.The operation will fail if the
pathalready exists but is not a directory.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
mkdirsAndAwait
public Void mkdirsAndAwait(String path)
Blocking variant ofmkdirs(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
mkdirsBlocking
public FileSystem mkdirsBlocking(String path)
- Parameters:
path-- Returns:
-
mkdirs
public io.smallrye.mutiny.Uni<Void> mkdirs(String path, String perms)
Create the directory represented bypathand 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
pathalready exists but is not a directory.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the fileperms- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
mkdirsAndAwait
public Void mkdirsAndAwait(String path, String perms)
Blocking variant ofmkdirs(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-perms-- Returns:
-
readDir
public io.smallrye.mutiny.Uni<List<String>> 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.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
readDirAndAwait
public List<String> readDirAndAwait(String path)
Blocking variant ofreadDir(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
readDir
public io.smallrye.mutiny.Uni<List<String>> readDir(String path, String filter)
Read the contents of the directory specified bypath, asynchronously.The parameter
filteris a regular expression. Iffilteris 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.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the directoryfilter- the filter expression- Returns:
- a reference to this, so the API can be used fluently
-
readDirAndAwait
public List<String> readDirAndAwait(String path, String filter)
Blocking variant ofreadDir(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-filter-- Returns:
-
readFile
public io.smallrye.mutiny.Uni<Buffer> readFile(String path)
Reads the entire file as represented by the pathpathas a , asynchronously.Do not use this method to read very large files or you risk running out of available RAM.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
readFileAndAwait
public Buffer readFileAndAwait(String path)
Blocking variant ofreadFile(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
writeFile
public io.smallrye.mutiny.Uni<Void> writeFile(String path, Buffer data)
Creates the file, and writes the specifiedBuffer datato the file represented by the pathpath, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the filedata-- Returns:
- a reference to this, so the API can be used fluently
-
writeFileAndAwait
public Void writeFileAndAwait(String path, Buffer data)
Blocking variant ofwriteFile(String,io.vertx.mutiny.core.buffer.Buffer).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-data-- Returns:
-
open
public io.smallrye.mutiny.Uni<AsyncFile> open(String path, io.vertx.core.file.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.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- 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
-
openAndAwait
public AsyncFile openAndAwait(String path, io.vertx.core.file.OpenOptions options)
Blocking variant ofopen(String,OpenOptions).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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, io.vertx.core.file.OpenOptions options)
- Parameters:
path-options-- Returns:
-
createFile
public io.smallrye.mutiny.Uni<Void> createFile(String path)
Creates an empty file with the specifiedpath, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
createFileAndAwait
public Void createFileAndAwait(String path)
Blocking variant ofcreateFile(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
createFileBlocking
public FileSystem createFileBlocking(String path)
- Parameters:
path-- Returns:
-
createFile
public io.smallrye.mutiny.Uni<Void> createFile(String path, String perms)
Creates an empty file with the specifiedpathand permissionsperms, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the fileperms- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
createFileAndAwait
public Void createFileAndAwait(String path, String perms)
Blocking variant ofcreateFile(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-perms-- Returns:
-
exists
public io.smallrye.mutiny.Uni<Boolean> exists(String path)
Determines whether the file as specified by the pathpathexists, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
existsAndAwait
public Boolean existsAndAwait(String path)
Blocking variant ofexists(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
path- path to the file- Returns:
- a reference to this, so the API can be used fluently
-
existsBlocking
public boolean existsBlocking(String path)
- Parameters:
path-- Returns:
-
fsProps
public io.smallrye.mutiny.Uni<FileSystemProps> fsProps(String path)
Returns properties of the file-system being used by the specifiedpath, asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
path- path to anywhere on the filesystem- Returns:
- a reference to this, so the API can be used fluently
-
fsPropsAndAwait
public FileSystemProps fsPropsAndAwait(String path)
Blocking variant offsProps(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
path-- Returns:
-
createTempDirectory
public io.smallrye.mutiny.Uni<String> 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.createTempFilemethods, this method is only part of a temporary-file facility.ARuntime, or theFilemechanism may be used to delete the directory automatically.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- 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
-
createTempDirectoryAndAwait
public String createTempDirectoryAndAwait(String prefix)
Blocking variant ofcreateTempDirectory(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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)
- Parameters:
prefix-- Returns:
-
createTempDirectory
public io.smallrye.mutiny.Uni<String> 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.createTempFilemethods, this method is only part of a temporary-file facility.ARuntime, or theFilemechanism may be used to delete the directory automatically.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
prefix- the prefix string to be used in generating the directory's name; may benullperms- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
createTempDirectoryAndAwait
public String createTempDirectoryAndAwait(String prefix, String perms)
Blocking variant ofcreateTempDirectory(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
prefix- the prefix string to be used in generating the directory's name; may benullperms- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
createTempDirectoryBlocking
public String createTempDirectoryBlocking(String prefix, String perms)
- Parameters:
prefix-perms-- Returns:
-
createTempDirectory
public io.smallrye.mutiny.Uni<String> 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.createTempFilemethods, this method is only part of a temporary-file facility.ARuntime, or theFilemechanism may be used to delete the directory automatically.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- 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 benullperms- the permissions string- Returns:
- a reference to this, so the API can be used fluently
-
createTempDirectoryAndAwait
public String createTempDirectoryAndAwait(String dir, String prefix, String perms)
Blocking variant ofcreateTempDirectory(String,String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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 benullperms- 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)
- Parameters:
dir-prefix-perms-- Returns:
-
createTempFile
public io.smallrye.mutiny.Uni<String> 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.createTempFilemethods, this method is only part of a temporary-file facility.ARuntime, or theFilemechanism may be used to delete the directory automatically.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
prefix- the prefix string to be used in generating the directory's name; may benullsuffix- 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
-
createTempFileAndAwait
public String createTempFileAndAwait(String prefix, String suffix)
Blocking variant ofcreateTempFile(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
prefix- the prefix string to be used in generating the directory's name; may benullsuffix- 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)
- Parameters:
prefix-suffix-- Returns:
-
createTempFile
public io.smallrye.mutiny.Uni<String> 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.createTempFilemethods, this method is only part of a temporary-file facility.ARuntime, or theFilemechanism may be used to delete the directory automatically.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
prefix- the prefix string to be used in generating the directory's name; may benullsuffix- 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
-
createTempFileAndAwait
public String createTempFileAndAwait(String prefix, String suffix, String perms)
Blocking variant ofcreateTempFile(String,String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
prefix- the prefix string to be used in generating the directory's name; may benullsuffix- 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)
- Parameters:
prefix-suffix-perms-- Returns:
-
createTempFile
public io.smallrye.mutiny.Uni<String> 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.createTempFilemethods, this method is only part of a temporary-file facility.ARuntime, or theFilemechanism may be used to delete the directory automatically.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- 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 benullsuffix- 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
-
createTempFileAndAwait
public String createTempFileAndAwait(String dir, String prefix, String suffix, String perms)
Blocking variant ofcreateTempFile(String,String,String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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 benullsuffix- 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)
- Parameters:
dir-prefix-suffix-perms-- Returns:
-
newInstance
public static FileSystem newInstance(io.vertx.core.file.FileSystem arg)
-
-