Class 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 the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • FileSystem

        public FileSystem​(io.vertx.core.file.FileSystem delegate)
      • FileSystem

        public FileSystem​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.core.file.FileSystem getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • copy

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> copy​(String from,
                                                 String to)
        Copy a file from the path from to path to, 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 from
        to - the path to copy to
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • copyAndAwait

        public Void copyAndAwait​(String from,
                                 String to)
        Blocking variant of copy(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 from
        to - the path to copy to
        Returns:
        the Void instance produced by the operation.
      • copyAndForget

        public FileSystem copyAndForget​(String from,
                                        String to)
        Variant of copy(String,String) that ignores the result of the operation.

        This method subscribes on the result of copy(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from copy(String,String) but you don't need to compose it with other operations.

        Parameters:
        from - the path to copy from
        to - the path to copy to
        Returns:
        the instance of FileSystem to chain method calls.
      • copy

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> copy​(String from,
                                                 String to,
                                                 io.vertx.core.file.CopyOptions options)
        Copy a file from the path from to path 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:
        from - the path to copy from
        to - the path to copy to
        options - options describing how the file should be copied
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • copyAndAwait

        public Void copyAndAwait​(String from,
                                 String to,
                                 io.vertx.core.file.CopyOptions options)
        Blocking variant of copy(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 from
        to - the path to copy to
        options - options describing how the file should be copied
        Returns:
        the Void instance produced by the operation.
      • copyAndForget

        public FileSystem copyAndForget​(String from,
                                        String to,
                                        io.vertx.core.file.CopyOptions options)
        Variant of copy(String,String,CopyOptions) that ignores the result of the operation.

        This method subscribes on the result of copy(String,String,CopyOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from copy(String,String,CopyOptions) but you don't need to compose it with other operations.

        Parameters:
        from - the path to copy from
        to - the path to copy to
        options - options describing how the file should be copied
        Returns:
        the instance of FileSystem to chain method calls.
      • copyBlocking

        public FileSystem copyBlocking​(String from,
                                       String to)
        Parameters:
        from -
        to -
        Returns:
        the instance of FileSystem to chain method calls.
      • copyRecursive

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> copyRecursive​(String from,
                                                          String to,
                                                          boolean recursive)
        Copy a file from the path from to path to, asynchronously.

        If recursive is true and from represents a directory, then the directory and its contents will be copied recursively to the destination to.

        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 from
        to - the path to copy to
        recursive -
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • copyRecursiveAndAwait

        public Void copyRecursiveAndAwait​(String from,
                                          String to,
                                          boolean recursive)
        Blocking variant of copyRecursive(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 from
        to - the path to copy to
        recursive -
        Returns:
        the Void instance produced by the operation.
      • copyRecursiveBlocking

        public FileSystem copyRecursiveBlocking​(String from,
                                                String to,
                                                boolean recursive)
        Parameters:
        from -
        to -
        recursive -
        Returns:
        the instance of FileSystem to chain method calls.
      • move

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> move​(String from,
                                                 String to)
        Move a file from the path from to path to, 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 from
        to - the path to copy to
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • moveAndAwait

        public Void moveAndAwait​(String from,
                                 String to)
        Blocking variant of move(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 from
        to - the path to copy to
        Returns:
        the Void instance produced by the operation.
      • moveAndForget

        public FileSystem moveAndForget​(String from,
                                        String to)
        Variant of move(String,String) that ignores the result of the operation.

        This method subscribes on the result of move(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from move(String,String) but you don't need to compose it with other operations.

        Parameters:
        from - the path to copy from
        to - the path to copy to
        Returns:
        the instance of FileSystem to chain method calls.
      • move

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> move​(String from,
                                                 String to,
                                                 io.vertx.core.file.CopyOptions options)
        Move a file from the path from to path 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:
        from - the path to copy from
        to - the path to copy to
        options - options describing how the file should be copied
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • moveAndAwait

        public Void moveAndAwait​(String from,
                                 String to,
                                 io.vertx.core.file.CopyOptions options)
        Blocking variant of move(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 from
        to - the path to copy to
        options - options describing how the file should be copied
        Returns:
        the Void instance produced by the operation.
      • moveAndForget

        public FileSystem moveAndForget​(String from,
                                        String to,
                                        io.vertx.core.file.CopyOptions options)
        Variant of move(String,String,CopyOptions) that ignores the result of the operation.

        This method subscribes on the result of move(String,String,CopyOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from move(String,String,CopyOptions) but you don't need to compose it with other operations.

        Parameters:
        from - the path to copy from
        to - the path to copy to
        options - options describing how the file should be copied
        Returns:
        the instance of FileSystem to chain method calls.
      • moveBlocking

        public FileSystem moveBlocking​(String from,
                                       String to)
        Parameters:
        from -
        to -
        Returns:
        the instance of FileSystem to chain method calls.
      • truncate

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> truncate​(String path,
                                                     long len)
        Truncate the file represented by path to length len in bytes, asynchronously.

        The operation will fail if the file does not exist or len is less than zero.

        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
        len - the length to truncate it to
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • truncateAndAwait

        public Void truncateAndAwait​(String path,
                                     long len)
        Blocking variant of truncate(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 file
        len - the length to truncate it to
        Returns:
        the Void instance produced by the operation.
      • truncateAndForget

        public FileSystem truncateAndForget​(String path,
                                            long len)
        Variant of truncate(String,long) that ignores the result of the operation.

        This method subscribes on the result of truncate(String,long), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from truncate(String,long) but you don't need to compose it with other operations.

        Parameters:
        path - the path to the file
        len - the length to truncate it to
        Returns:
        the instance of FileSystem to chain method calls.
      • truncateBlocking

        public FileSystem truncateBlocking​(String path,
                                           long len)
        Parameters:
        path -
        len -
        Returns:
        the instance of FileSystem to chain method calls.
      • chmod

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> chmod​(String path,
                                                  String perms)
        Change the permissions on the file represented by path to perms, 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 file
        perms - the permissions string
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • chmodAndAwait

        public Void chmodAndAwait​(String path,
                                  String perms)
        Blocking variant of chmod(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 file
        perms - the permissions string
        Returns:
        the Void instance produced by the operation.
      • chmodAndForget

        public FileSystem chmodAndForget​(String path,
                                         String perms)
        Variant of chmod(String,String) that ignores the result of the operation.

        This method subscribes on the result of chmod(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from chmod(String,String) but you don't need to compose it with other operations.

        Parameters:
        path - the path to the file
        perms - the permissions string
        Returns:
        the instance of FileSystem to chain method calls.
      • chmodBlocking

        public FileSystem chmodBlocking​(String path,
                                        String perms)
        Parameters:
        path -
        perms -
        Returns:
        the instance of FileSystem to chain method calls.
      • chmodRecursive

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> chmodRecursive​(String path,
                                                           String perms,
                                                           String dirPerms)
        Change the permissions on the file represented by path to perms, 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 to perms.

        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
        perms - the permissions string
        dirPerms - the directory permissions
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • chmodRecursiveAndAwait

        public Void chmodRecursiveAndAwait​(String path,
                                           String perms,
                                           String dirPerms)
        Blocking variant of chmodRecursive(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 file
        perms - the permissions string
        dirPerms - the directory permissions
        Returns:
        the Void instance produced by the operation.
      • chmodRecursiveBlocking

        public FileSystem chmodRecursiveBlocking​(String path,
                                                 String perms,
                                                 String dirPerms)
        Parameters:
        path -
        perms -
        dirPerms -
        Returns:
        the instance of FileSystem to chain method calls.
      • chown

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> chown​(String path,
                                                  String user,
                                                  String group)
        Change the ownership on the file represented by path to user and {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 file
        user - the user name, null will not change the user name
        group - the user group, null will not change the user group name
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • chownAndAwait

        public Void chownAndAwait​(String path,
                                  String user,
                                  String group)
        Blocking variant of chown(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 file
        user - the user name, null will not change the user name
        group - the user group, null will not change the user group name
        Returns:
        the Void instance produced by the operation.
      • chownAndForget

        public FileSystem chownAndForget​(String path,
                                         String user,
                                         String group)
        Variant of chown(String,String,String) that ignores the result of the operation.

        This method subscribes on the result of chown(String,String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from chown(String,String,String) but you don't need to compose it with other operations.

        Parameters:
        path - the path to the file
        user - the user name, null will not change the user name
        group - the user group, null will not change the user group name
        Returns:
        the instance of FileSystem to chain method calls.
      • chownBlocking

        public FileSystem chownBlocking​(String path,
                                        String user,
                                        String group)
        Parameters:
        path -
        user -
        group -
        Returns:
        the instance of FileSystem to chain method calls.
      • props

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<FileProps> props​(String path)
        Obtain properties for the file represented by path, 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • propsAndAwait

        public FileProps propsAndAwait​(String path)
        Blocking variant of props(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:
        the FileProps instance produced by the operation.
      • propsAndForget

        public FileSystem propsAndForget​(String path)
        Variant of props(String) that ignores the result of the operation.

        This method subscribes on the result of props(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from props(String) but you don't need to compose it with other operations.

        Parameters:
        path - the path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • propsBlocking

        public FileProps propsBlocking​(String path)
        Parameters:
        path -
        Returns:
      • lprops

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<FileProps> lprops​(String path)
        Obtain properties for the link represented by path, 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • lpropsAndAwait

        public FileProps lpropsAndAwait​(String path)
        Blocking variant of lprops(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:
        the FileProps instance produced by the operation.
      • lpropsAndForget

        public FileSystem lpropsAndForget​(String path)
        Variant of lprops(String) that ignores the result of the operation.

        This method subscribes on the result of lprops(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from lprops(String) but you don't need to compose it with other operations.

        Parameters:
        path - the path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • lpropsBlocking

        public FileProps lpropsBlocking​(String path)
        Parameters:
        path -
        Returns:
      • link

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> link​(String link,
                                                 String existing)
        Create a hard link on the file system from link to existing, 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
        existing - the link destination
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • linkAndAwait

        public Void linkAndAwait​(String link,
                                 String existing)
        Blocking variant of link(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 link
        existing - the link destination
        Returns:
        the Void instance produced by the operation.
      • linkAndForget

        public FileSystem linkAndForget​(String link,
                                        String existing)
        Variant of link(String,String) that ignores the result of the operation.

        This method subscribes on the result of link(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from link(String,String) but you don't need to compose it with other operations.

        Parameters:
        link - the link
        existing - the link destination
        Returns:
        the instance of FileSystem to chain method calls.
      • linkBlocking

        public FileSystem linkBlocking​(String link,
                                       String existing)
        Parameters:
        link -
        existing -
        Returns:
        the instance of FileSystem to chain method calls.
      • symlink

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> symlink​(String link,
                                                    String existing)
        Create a symbolic link on the file system from link to existing, 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
        existing - the link destination
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • symlinkAndAwait

        public Void symlinkAndAwait​(String link,
                                    String existing)
        Blocking variant of symlink(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 link
        existing - the link destination
        Returns:
        the Void instance produced by the operation.
      • symlinkAndForget

        public FileSystem symlinkAndForget​(String link,
                                           String existing)
        Variant of symlink(String,String) that ignores the result of the operation.

        This method subscribes on the result of symlink(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from symlink(String,String) but you don't need to compose it with other operations.

        Parameters:
        link - the link
        existing - the link destination
        Returns:
        the instance of FileSystem to chain method calls.
      • symlinkBlocking

        public FileSystem symlinkBlocking​(String link,
                                          String existing)
        Parameters:
        link -
        existing -
        Returns:
        the instance of FileSystem to chain method calls.
      • unlink

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> unlink​(String link)
        Unlinks the link on the file system represented by the path link, 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • unlinkAndAwait

        public Void unlinkAndAwait​(String link)
        Blocking variant of unlink(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:
        the Void instance produced by the operation.
      • unlinkAndForget

        public FileSystem unlinkAndForget​(String link)
        Variant of unlink(String) that ignores the result of the operation.

        This method subscribes on the result of unlink(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from unlink(String) but you don't need to compose it with other operations.

        Parameters:
        link - the link
        Returns:
        the instance of FileSystem to chain method calls.
      • unlinkBlocking

        public FileSystem unlinkBlocking​(String link)
        Parameters:
        link -
        Returns:
        the instance of FileSystem to chain method calls.
      • readSymlink

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<String> readSymlink​(String link)
        Returns the path representing the file that the symbolic link specified by link points 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • readSymlinkAndAwait

        public String readSymlinkAndAwait​(String link)
        Blocking variant of readSymlink(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:
        the String instance produced by the operation.
      • readSymlinkAndForget

        public FileSystem readSymlinkAndForget​(String link)
        Variant of readSymlink(String) that ignores the result of the operation.

        This method subscribes on the result of readSymlink(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from readSymlink(String) but you don't need to compose it with other operations.

        Parameters:
        link - the link
        Returns:
        the instance of FileSystem to chain method calls.
      • readSymlinkBlocking

        public String readSymlinkBlocking​(String link)
        Parameters:
        link -
        Returns:
      • delete

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> delete​(String path)
        Deletes the file represented by the specified path, 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • deleteAndAwait

        public Void deleteAndAwait​(String path)
        Blocking variant of delete(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:
        the Void instance produced by the operation.
      • deleteAndForget

        public FileSystem deleteAndForget​(String path)
        Variant of delete(String) that ignores the result of the operation.

        This method subscribes on the result of delete(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from delete(String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • deleteBlocking

        public FileSystem deleteBlocking​(String path)
        Parameters:
        path -
        Returns:
        the instance of FileSystem to chain method calls.
      • deleteRecursive

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> deleteRecursive​(String path,
                                                            boolean recursive)
        Deletes the file represented by the specified path, asynchronously.

        If the path represents a directory and recursive = true then the directory and its contents will be deleted recursively.

        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
        recursive - delete recursively?
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • deleteRecursiveAndAwait

        public Void deleteRecursiveAndAwait​(String path,
                                            boolean recursive)
        Blocking variant of deleteRecursive(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 file
        recursive - delete recursively?
        Returns:
        the Void instance produced by the operation.
      • deleteRecursiveAndForget

        public FileSystem deleteRecursiveAndForget​(String path,
                                                   boolean recursive)
        Variant of deleteRecursive(String,boolean) that ignores the result of the operation.

        This method subscribes on the result of deleteRecursive(String,boolean), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from deleteRecursive(String,boolean) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        recursive - delete recursively?
        Returns:
        the instance of FileSystem to chain method calls.
      • deleteRecursiveBlocking

        public FileSystem deleteRecursiveBlocking​(String path,
                                                  boolean recursive)
        Parameters:
        path -
        recursive -
        Returns:
        the instance of FileSystem to chain method calls.
      • mkdir

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> mkdir​(String path)
        Create the directory represented by path, 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • mkdirAndAwait

        public Void mkdirAndAwait​(String path)
        Blocking variant of mkdir(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:
        the Void instance produced by the operation.
      • mkdirAndForget

        public FileSystem mkdirAndForget​(String path)
        Variant of mkdir(String) that ignores the result of the operation.

        This method subscribes on the result of mkdir(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from mkdir(String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • mkdirBlocking

        public FileSystem mkdirBlocking​(String path)
        Parameters:
        path -
        Returns:
        the instance of FileSystem to chain method calls.
      • mkdir

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> mkdir​(String path,
                                                  String perms)
        Create the directory represented by path, asynchronously.

        The new directory will be created with permissions as specified by perms.

        The permission String takes the form rwxr-x--- as specified in here.

        The operation will fail if the directory already exists.

        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
        perms - the permissions string
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • mkdirAndAwait

        public Void mkdirAndAwait​(String path,
                                  String perms)
        Blocking variant of mkdir(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 file
        perms - the permissions string
        Returns:
        the Void instance produced by the operation.
      • mkdirAndForget

        public FileSystem mkdirAndForget​(String path,
                                         String perms)
        Variant of mkdir(String,String) that ignores the result of the operation.

        This method subscribes on the result of mkdir(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from mkdir(String,String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        perms - the permissions string
        Returns:
        the instance of FileSystem to chain method calls.
      • mkdirBlocking

        public FileSystem mkdirBlocking​(String path,
                                        String perms)
        Parameters:
        path -
        perms -
        Returns:
        the instance of FileSystem to chain method calls.
      • mkdirs

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> mkdirs​(String path)
        Create the directory represented by path and any non existent parents, asynchronously.

        The operation will fail if the path already 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • mkdirsAndAwait

        public Void mkdirsAndAwait​(String path)
        Blocking variant of mkdirs(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:
        the Void instance produced by the operation.
      • mkdirsAndForget

        public FileSystem mkdirsAndForget​(String path)
        Variant of mkdirs(String) that ignores the result of the operation.

        This method subscribes on the result of mkdirs(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from mkdirs(String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • mkdirsBlocking

        public FileSystem mkdirsBlocking​(String path)
        Parameters:
        path -
        Returns:
        the instance of FileSystem to chain method calls.
      • mkdirs

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> mkdirs​(String path,
                                                   String perms)
        Create the directory represented by path and any non existent parents, asynchronously.

        The new directory will be created with permissions as specified by perms.

        The permission String takes the form rwxr-x--- as specified in here.

        The operation will fail if the path already 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
        perms - the permissions string
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • mkdirsAndAwait

        public Void mkdirsAndAwait​(String path,
                                   String perms)
        Blocking variant of mkdirs(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 file
        perms - the permissions string
        Returns:
        the Void instance produced by the operation.
      • mkdirsAndForget

        public FileSystem mkdirsAndForget​(String path,
                                          String perms)
        Variant of mkdirs(String,String) that ignores the result of the operation.

        This method subscribes on the result of mkdirs(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from mkdirs(String,String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        perms - the permissions string
        Returns:
        the instance of FileSystem to chain method calls.
      • mkdirsBlocking

        public FileSystem mkdirsBlocking​(String path,
                                         String perms)
        Parameters:
        path -
        perms -
        Returns:
        the instance of FileSystem to chain method calls.
      • readDir

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<String>> readDir​(String path)
        Read the contents of the directory specified by path, asynchronously.

        The result is an array of String representing the paths of the files inside the directory.

        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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • readDirAndAwait

        public List<String> readDirAndAwait​(String path)
        Blocking variant of readDir(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:
        the List instance produced by the operation.
      • readDirAndForget

        public FileSystem readDirAndForget​(String path)
        Variant of readDir(String) that ignores the result of the operation.

        This method subscribes on the result of readDir(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from readDir(String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • readDirBlocking

        public List<String> readDirBlocking​(String path)
        Parameters:
        path -
        Returns:
      • readDir

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<String>> readDir​(String path,
                                                            String filter)
        Read the contents of the directory specified by path, asynchronously.

        The parameter filter is a regular expression. If filter 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.

        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 directory
        filter - the filter expression
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • readDirAndAwait

        public List<String> readDirAndAwait​(String path,
                                            String filter)
        Blocking variant of readDir(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 directory
        filter - the filter expression
        Returns:
        the List instance produced by the operation.
      • readDirAndForget

        public FileSystem readDirAndForget​(String path,
                                           String filter)
        Variant of readDir(String,String) that ignores the result of the operation.

        This method subscribes on the result of readDir(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from readDir(String,String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the directory
        filter - the filter expression
        Returns:
        the instance of FileSystem to chain method calls.
      • readDirBlocking

        public List<String> readDirBlocking​(String path,
                                            String filter)
        Parameters:
        path -
        filter -
        Returns:
      • readFile

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Buffer> readFile​(String path)
        Reads the entire file as represented by the path path as a , asynchronously.

        Do not use this method to read very large files or you risk running out of available RAM.

        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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • readFileAndAwait

        public Buffer readFileAndAwait​(String path)
        Blocking variant of readFile(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:
        the Buffer instance produced by the operation.
      • readFileAndForget

        public FileSystem readFileAndForget​(String path)
        Variant of readFile(String) that ignores the result of the operation.

        This method subscribes on the result of readFile(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from readFile(String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • readFileBlocking

        public Buffer readFileBlocking​(String path)
        Parameters:
        path -
        Returns:
      • writeFile

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> writeFile​(String path,
                                                      Buffer data)
        Creates the file, and writes the specified Buffer data to the file represented by the path path, 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
        data -
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • writeFileAndAwait

        public Void writeFileAndAwait​(String path,
                                      Buffer data)
        Blocking variant of writeFile(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 file
        data -
        Returns:
        the Void instance produced by the operation.
      • writeFileBlocking

        public FileSystem writeFileBlocking​(String path,
                                            Buffer data)
        Parameters:
        path -
        data -
        Returns:
        the instance of FileSystem to chain method calls.
      • open

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<AsyncFile> open​(String path,
                                                      io.vertx.core.file.OpenOptions options)
        Open the file represented by path, asynchronously.

        The file is opened for both reading and writing. If the file does not already exist it will be created.

        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
        options - options describing how the file should be opened
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • openAndAwait

        public AsyncFile openAndAwait​(String path,
                                      io.vertx.core.file.OpenOptions options)
        Blocking variant of open(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 file
        options - options describing how the file should be opened
        Returns:
        the AsyncFile instance produced by the operation.
      • openAndForget

        public FileSystem openAndForget​(String path,
                                        io.vertx.core.file.OpenOptions options)
        Variant of open(String,OpenOptions) that ignores the result of the operation.

        This method subscribes on the result of open(String,OpenOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from open(String,OpenOptions) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        options - options describing how the file should be opened
        Returns:
        the instance of FileSystem to chain method calls.
      • openBlocking

        public AsyncFile openBlocking​(String path,
                                      io.vertx.core.file.OpenOptions options)
        Parameters:
        path -
        options -
        Returns:
      • createFile

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> createFile​(String path)
        Creates an empty file with the specified path, 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • createFileAndAwait

        public Void createFileAndAwait​(String path)
        Blocking variant of createFile(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:
        the Void instance produced by the operation.
      • createFileAndForget

        public FileSystem createFileAndForget​(String path)
        Variant of createFile(String) that ignores the result of the operation.

        This method subscribes on the result of createFile(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from createFile(String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • createFileBlocking

        public FileSystem createFileBlocking​(String path)
        Parameters:
        path -
        Returns:
        the instance of FileSystem to chain method calls.
      • createFile

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> createFile​(String path,
                                                       String perms)
        Creates an empty file with the specified path and permissions perms, 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
        perms - the permissions string
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • createFileAndAwait

        public Void createFileAndAwait​(String path,
                                       String perms)
        Blocking variant of createFile(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 file
        perms - the permissions string
        Returns:
        the Void instance produced by the operation.
      • createFileAndForget

        public FileSystem createFileAndForget​(String path,
                                              String perms)
        Variant of createFile(String,String) that ignores the result of the operation.

        This method subscribes on the result of createFile(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from createFile(String,String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        perms - the permissions string
        Returns:
        the instance of FileSystem to chain method calls.
      • createFileBlocking

        public FileSystem createFileBlocking​(String path,
                                             String perms)
        Parameters:
        path -
        perms -
        Returns:
        the instance of FileSystem to chain method calls.
      • exists

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Boolean> exists​(String path)
        Determines whether the file as specified by the path path exists, 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • existsAndAwait

        public Boolean existsAndAwait​(String path)
        Blocking variant of exists(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:
        the Boolean instance produced by the operation.
      • existsAndForget

        public FileSystem existsAndForget​(String path)
        Variant of exists(String) that ignores the result of the operation.

        This method subscribes on the result of exists(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from exists(String) but you don't need to compose it with other operations.

        Parameters:
        path - path to the file
        Returns:
        the instance of FileSystem to chain method calls.
      • existsBlocking

        public boolean existsBlocking​(String path)
        Parameters:
        path -
        Returns:
      • fsProps

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<FileSystemProps> fsProps​(String path)
        Returns properties of the file-system being used by the specified path, 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:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • fsPropsAndAwait

        public FileSystemProps fsPropsAndAwait​(String path)
        Blocking variant of fsProps(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:
        the FileSystemProps instance produced by the operation.
      • fsPropsAndForget

        public FileSystem fsPropsAndForget​(String path)
        Variant of fsProps(String) that ignores the result of the operation.

        This method subscribes on the result of fsProps(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from fsProps(String) but you don't need to compose it with other operations.

        Parameters:
        path - path to anywhere on the filesystem
        Returns:
        the instance of FileSystem to chain method calls.
      • createTempDirectory

        @CheckReturnValue
        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.createTempFile methods, this method is only part of a temporary-file facility.A Runtime, or the File mechanism 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 be null
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • createTempDirectoryAndAwait

        public String createTempDirectoryAndAwait​(String prefix)
        Blocking variant of createTempDirectory(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 be null
        Returns:
        the String instance produced by the operation.
      • createTempDirectoryAndForget

        public FileSystem createTempDirectoryAndForget​(String prefix)
        Variant of createTempDirectory(String) that ignores the result of the operation.

        This method subscribes on the result of createTempDirectory(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from createTempDirectory(String) but you don't need to compose it with other operations.

        Parameters:
        prefix - the prefix string to be used in generating the directory's name; may be null
        Returns:
        the instance of FileSystem to chain method calls.
      • createTempDirectoryBlocking

        public String createTempDirectoryBlocking​(String prefix)
        Parameters:
        prefix -
        Returns:
      • createTempDirectory

        @CheckReturnValue
        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 perms.

        The permission String takes the form rwxr-x--- as specified in here.

        As with the File.createTempFile methods, this method is only part of a temporary-file facility.A Runtime, or the File mechanism 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 be null
        perms - the permissions string
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • createTempDirectoryAndAwait

        public String createTempDirectoryAndAwait​(String prefix,
                                                  String perms)
        Blocking variant of createTempDirectory(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 be null
        perms - the permissions string
        Returns:
        the String instance produced by the operation.
      • createTempDirectoryAndForget

        public FileSystem createTempDirectoryAndForget​(String prefix,
                                                       String perms)
        Variant of createTempDirectory(String,String) that ignores the result of the operation.

        This method subscribes on the result of createTempDirectory(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from createTempDirectory(String,String) but you don't need to compose it with other operations.

        Parameters:
        prefix - the prefix string to be used in generating the directory's name; may be null
        perms - the permissions string
        Returns:
        the instance of FileSystem to chain method calls.
      • createTempDirectoryBlocking

        public String createTempDirectoryBlocking​(String prefix,
                                                  String perms)
        Parameters:
        prefix -
        perms -
        Returns:
      • createTempDirectory

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<String> createTempDirectory​(String dir,
                                                                  String prefix,
                                                                  String perms)
        Creates a new directory in the directory provided by the path path, using the given prefix to generate its name, asynchronously.

        The new directory will be created with permissions as specified by perms.

        The permission String takes the form rwxr-x--- as specified in here.

        As with the File.createTempFile methods, this method is only part of a temporary-file facility.A Runtime, or the File mechanism 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 directory
        prefix - the prefix string to be used in generating the directory's name; may be null
        perms - the permissions string
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • createTempDirectoryAndAwait

        public String createTempDirectoryAndAwait​(String dir,
                                                  String prefix,
                                                  String perms)
        Blocking variant of createTempDirectory(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 directory
        prefix - the prefix string to be used in generating the directory's name; may be null
        perms - the permissions string
        Returns:
        the String instance produced by the operation.
      • createTempDirectoryAndForget

        public FileSystem createTempDirectoryAndForget​(String dir,
                                                       String prefix,
                                                       String perms)
        Variant of createTempDirectory(String,String,String) that ignores the result of the operation.

        This method subscribes on the result of createTempDirectory(String,String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from createTempDirectory(String,String,String) but you don't need to compose it with other operations.

        Parameters:
        dir - the path to directory in which to create the directory
        prefix - the prefix string to be used in generating the directory's name; may be null
        perms - the permissions string
        Returns:
        the instance of FileSystem to chain method calls.
      • createTempDirectoryBlocking

        public String createTempDirectoryBlocking​(String dir,
                                                  String prefix,
                                                  String perms)
        Parameters:
        dir -
        prefix -
        perms -
        Returns:
      • createTempFile

        @CheckReturnValue
        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.createTempFile methods, this method is only part of a temporary-file facility.A Runtime, or the File mechanism 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 be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • createTempFileAndAwait

        public String createTempFileAndAwait​(String prefix,
                                             String suffix)
        Blocking variant of createTempFile(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 be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        Returns:
        the String instance produced by the operation.
      • createTempFileAndForget

        public FileSystem createTempFileAndForget​(String prefix,
                                                  String suffix)
        Variant of createTempFile(String,String) that ignores the result of the operation.

        This method subscribes on the result of createTempFile(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from createTempFile(String,String) but you don't need to compose it with other operations.

        Parameters:
        prefix - the prefix string to be used in generating the directory's name; may be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        Returns:
        the instance of FileSystem to chain method calls.
      • createTempFileBlocking

        public String createTempFileBlocking​(String prefix,
                                             String suffix)
        Parameters:
        prefix -
        suffix -
        Returns:
      • createTempFile

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<String> createTempFile​(String prefix,
                                                             String suffix,
                                                             String perms)
        Creates a new file in the directory provided by the path dir, using the given prefix and suffix to generate its name, asynchronously.

        As with the File.createTempFile methods, this method is only part of a temporary-file facility.A Runtime, or the File mechanism 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 be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        perms -
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • createTempFileAndAwait

        public String createTempFileAndAwait​(String prefix,
                                             String suffix,
                                             String perms)
        Blocking variant of createTempFile(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 be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        perms -
        Returns:
        the String instance produced by the operation.
      • createTempFileAndForget

        public FileSystem createTempFileAndForget​(String prefix,
                                                  String suffix,
                                                  String perms)
        Variant of createTempFile(String,String,String) that ignores the result of the operation.

        This method subscribes on the result of createTempFile(String,String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from createTempFile(String,String,String) but you don't need to compose it with other operations.

        Parameters:
        prefix - the prefix string to be used in generating the directory's name; may be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        perms -
        Returns:
        the instance of FileSystem to chain method calls.
      • createTempFileBlocking

        public String createTempFileBlocking​(String prefix,
                                             String suffix,
                                             String perms)
        Parameters:
        prefix -
        suffix -
        perms -
        Returns:
      • createTempFile

        @CheckReturnValue
        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 path dir, using the given prefix and suffix to generate its name, asynchronously.

        The new directory will be created with permissions as specified by perms.

        The permission String takes the form rwxr-x--- as specified in here.

        As with the File.createTempFile methods, this method is only part of a temporary-file facility.A Runtime, or the File mechanism 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 directory
        prefix - the prefix string to be used in generating the directory's name; may be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        perms - the permissions string
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • createTempFileAndAwait

        public String createTempFileAndAwait​(String dir,
                                             String prefix,
                                             String suffix,
                                             String perms)
        Blocking variant of createTempFile(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 directory
        prefix - the prefix string to be used in generating the directory's name; may be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        perms - the permissions string
        Returns:
        the String instance produced by the operation.
      • createTempFileAndForget

        public FileSystem createTempFileAndForget​(String dir,
                                                  String prefix,
                                                  String suffix,
                                                  String perms)
        Variant of createTempFile(String,String,String,String) that ignores the result of the operation.

        This method subscribes on the result of createTempFile(String,String,String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from createTempFile(String,String,String,String) but you don't need to compose it with other operations.

        Parameters:
        dir - the path to directory in which to create the directory
        prefix - the prefix string to be used in generating the directory's name; may be null
        suffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
        perms - the permissions string
        Returns:
        the instance of FileSystem to chain method calls.
      • 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)