Class FilesUncheck


  • public final class FilesUncheck
    extends java.lang.Object
    Delegates to Files to uncheck calls by throwing UncheckedIOException instead of IOException.
    Since:
    2.12.0
    See Also:
    Files, IOException, UncheckedIOException
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long copy​(java.io.InputStream in, java.nio.file.Path target, java.nio.file.CopyOption... options)
      Delegates to Files.copy(InputStream, Path, CopyOption...) throwing UncheckedIOException instead of IOException.
      static long copy​(java.nio.file.Path source, java.io.OutputStream out)
      Delegates to Files.copy(Path, OutputStream) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path copy​(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)
      Delegates to Files.copy(Path, Path, CopyOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createDirectories​(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.createDirectories(Path, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createDirectory​(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.createDirectory(Path, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createFile​(java.nio.file.Path path, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.createFile(Path, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createLink​(java.nio.file.Path link, java.nio.file.Path existing)
      Delegates to Files.createLink(Path, Path) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createSymbolicLink​(java.nio.file.Path link, java.nio.file.Path target, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.createSymbolicLink(Path, Path, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createTempDirectory​(java.lang.String prefix, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.createTempDirectory(String, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createTempDirectory​(java.nio.file.Path dir, java.lang.String prefix, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.createTempDirectory(Path, String, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createTempFile​(java.lang.String prefix, java.lang.String suffix, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.createTempFile(String, String, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path createTempFile​(java.nio.file.Path dir, java.lang.String prefix, java.lang.String suffix, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.createTempFile(Path, String, String, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static void delete​(java.nio.file.Path path)
      Delegates to Files.delete(Path) throwing UncheckedIOException instead of IOException.
      static boolean deleteIfExists​(java.nio.file.Path path)
      Delegates to Files.deleteIfExists(Path) throwing UncheckedIOException instead of IOException.
      static java.lang.Object getAttribute​(java.nio.file.Path path, java.lang.String attribute, java.nio.file.LinkOption... options)
      Delegates to Files.getAttribute(Path, String, LinkOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.FileStore getFileStore​(java.nio.file.Path path)
      Delegates to Files.getFileStore(Path) throwing UncheckedIOException instead of IOException.
      static java.nio.file.attribute.FileTime getLastModifiedTime​(java.nio.file.Path path, java.nio.file.LinkOption... options)
      Delegates to Files.getLastModifiedTime(Path, LinkOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.attribute.UserPrincipal getOwner​(java.nio.file.Path path, java.nio.file.LinkOption... options)
      Delegates to Files.getOwner(Path, LinkOption...) throwing UncheckedIOException instead of IOException.
      static java.util.Set<java.nio.file.attribute.PosixFilePermission> getPosixFilePermissions​(java.nio.file.Path path, java.nio.file.LinkOption... options)
      Delegates to Files.getPosixFilePermissions(Path, LinkOption...) throwing UncheckedIOException instead of IOException.
      static boolean isHidden​(java.nio.file.Path path)
      Delegates to Files.isHidden(Path) throwing UncheckedIOException instead of IOException.
      static boolean isSameFile​(java.nio.file.Path path, java.nio.file.Path path2)
      Delegates to Files.isSameFile(Path, Path) throwing UncheckedIOException instead of IOException.
      static java.util.stream.Stream<java.lang.String> lines​(java.nio.file.Path path)
      Delegates to Files.lines(Path) throwing UncheckedIOException instead of IOException.
      static java.util.stream.Stream<java.lang.String> lines​(java.nio.file.Path path, java.nio.charset.Charset cs)
      Delegates to Files.lines(Path, Charset) throwing UncheckedIOException instead of IOException.
      static java.util.stream.Stream<java.nio.file.Path> list​(java.nio.file.Path dir)
      Delegates to Files.list(Path) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path move​(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)
      Delegates to Files.move(Path, Path, CopyOption...) throwing UncheckedIOException instead of IOException.
      static java.io.BufferedReader newBufferedReader​(java.nio.file.Path path)
      Delegates to Files.newBufferedReader(Path) throwing UncheckedIOException instead of IOException.
      static java.io.BufferedReader newBufferedReader​(java.nio.file.Path path, java.nio.charset.Charset cs)
      Delegates to Files.newBufferedReader(Path, Charset) throwing UncheckedIOException instead of IOException.
      static java.io.BufferedWriter newBufferedWriter​(java.nio.file.Path path, java.nio.charset.Charset cs, java.nio.file.OpenOption... options)
      Delegates to Files.newBufferedWriter(Path, Charset, OpenOption...) throwing UncheckedIOException instead of IOException.
      static java.io.BufferedWriter newBufferedWriter​(java.nio.file.Path path, java.nio.file.OpenOption... options)
      Delegates to Files.newBufferedWriter(Path, OpenOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.channels.SeekableByteChannel newByteChannel​(java.nio.file.Path path, java.nio.file.OpenOption... options)
      Delegates to Files.newByteChannel(Path, OpenOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.channels.SeekableByteChannel newByteChannel​(java.nio.file.Path path, java.util.Set<? extends java.nio.file.OpenOption> options, java.nio.file.attribute.FileAttribute<?>... attrs)
      Delegates to Files.newByteChannel(Path, Set, FileAttribute...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path dir)
      Delegates to Files.newDirectoryStream(Path) throwing UncheckedIOException instead of IOException.
      static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path dir, java.lang.String glob)
      Delegates to Files.newDirectoryStream(Path, String) throwing UncheckedIOException instead of IOException.
      static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path dir, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)
      Delegates to Files.newDirectoryStream(Path, java.nio.file.DirectoryStream.Filter) throwing UncheckedIOException instead of IOException.
      static java.io.InputStream newInputStream​(java.nio.file.Path path, java.nio.file.OpenOption... options)
      Delegates to Files.newInputStream(Path, OpenOption...) throwing UncheckedIOException instead of IOException.
      static java.io.OutputStream newOutputStream​(java.nio.file.Path path, java.nio.file.OpenOption... options)
      Delegates to Files.newOutputStream(Path, OpenOption...) throwing UncheckedIOException instead of IOException.
      static java.lang.String probeContentType​(java.nio.file.Path path)
      Delegates to Files.probeContentType(Path) throwing UncheckedIOException instead of IOException.
      static byte[] readAllBytes​(java.nio.file.Path path)
      Delegates to Files.readAllBytes(Path) throwing UncheckedIOException instead of IOException.
      static java.util.List<java.lang.String> readAllLines​(java.nio.file.Path path)
      Delegates to Files.readAllLines(Path) throwing UncheckedIOException instead of IOException.
      static java.util.List<java.lang.String> readAllLines​(java.nio.file.Path path, java.nio.charset.Charset cs)
      Delegates to Files.readAllLines(Path, Charset) throwing UncheckedIOException instead of IOException.
      static <A extends java.nio.file.attribute.BasicFileAttributes>
      A
      readAttributes​(java.nio.file.Path path, java.lang.Class<A> type, java.nio.file.LinkOption... options)
      Delegates to Files.readAttributes(Path, Class, LinkOption...) throwing UncheckedIOException instead of IOException.
      static java.util.Map<java.lang.String,​java.lang.Object> readAttributes​(java.nio.file.Path path, java.lang.String attributes, java.nio.file.LinkOption... options)
      Delegates to Files.readAttributes(Path, String, LinkOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path readSymbolicLink​(java.nio.file.Path link)
      Delegates to Files.readSymbolicLink(Path) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path setAttribute​(java.nio.file.Path path, java.lang.String attribute, java.lang.Object value, java.nio.file.LinkOption... options)
      Delegates to Files.setAttribute(Path, String, Object, LinkOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path setLastModifiedTime​(java.nio.file.Path path, java.nio.file.attribute.FileTime time)
      Delegates to Files.setLastModifiedTime(Path, FileTime) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path setOwner​(java.nio.file.Path path, java.nio.file.attribute.UserPrincipal owner)
      Delegates to Files.setOwner(Path, UserPrincipal) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path setPosixFilePermissions​(java.nio.file.Path path, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms)
      Delegates to Files.setPosixFilePermissions(Path, Set) throwing UncheckedIOException instead of IOException.
      static long size​(java.nio.file.Path path)
      Delegates to Files.size(Path) throwing UncheckedIOException instead of IOException.
      static java.util.stream.Stream<java.nio.file.Path> walk​(java.nio.file.Path start, int maxDepth, java.nio.file.FileVisitOption... options)
      Delegates to Files.walk(Path, int, FileVisitOption...) throwing UncheckedIOException instead of IOException.
      static java.util.stream.Stream<java.nio.file.Path> walk​(java.nio.file.Path start, java.nio.file.FileVisitOption... options)
      Delegates to Files.walk(Path, FileVisitOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path walkFileTree​(java.nio.file.Path start, java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)
      Delegates to Files.walkFileTree(Path, FileVisitor) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path walkFileTree​(java.nio.file.Path start, java.util.Set<java.nio.file.FileVisitOption> options, int maxDepth, java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)
      Delegates to Files.walkFileTree(Path, Set, int, FileVisitor) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path write​(java.nio.file.Path path, byte[] bytes, java.nio.file.OpenOption... options)
      Delegates to Files.write(Path, byte[], OpenOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path write​(java.nio.file.Path path, java.lang.Iterable<? extends java.lang.CharSequence> lines, java.nio.charset.Charset cs, java.nio.file.OpenOption... options)
      Delegates to Files.write(Path, Iterable, Charset, OpenOption...) throwing UncheckedIOException instead of IOException.
      static java.nio.file.Path write​(java.nio.file.Path path, java.lang.Iterable<? extends java.lang.CharSequence> lines, java.nio.file.OpenOption... options)
      Delegates to Files.write(Path, Iterable, OpenOption...) throwing UncheckedIOException instead of IOException.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • copy

        public static long copy​(java.io.InputStream in,
                                java.nio.file.Path target,
                                java.nio.file.CopyOption... options)
        Delegates to Files.copy(InputStream, Path, CopyOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        in - See delegate.
        target - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
        See Also:
        Files.copy(InputStream, Path,CopyOption...)
      • copy

        public static long copy​(java.nio.file.Path source,
                                java.io.OutputStream out)
        Delegates to Files.copy(Path, OutputStream) throwing UncheckedIOException instead of IOException.
        Parameters:
        source - See delegate. See delegate.
        out - See delegate. See delegate.
        Returns:
        See delegate. See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • copy

        public static java.nio.file.Path copy​(java.nio.file.Path source,
                                              java.nio.file.Path target,
                                              java.nio.file.CopyOption... options)
        Delegates to Files.copy(Path, Path, CopyOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        source - See delegate.
        target - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createDirectories

        public static java.nio.file.Path createDirectories​(java.nio.file.Path dir,
                                                           java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.createDirectories(Path, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        dir - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createDirectory

        public static java.nio.file.Path createDirectory​(java.nio.file.Path dir,
                                                         java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.createDirectory(Path, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        dir - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createFile

        public static java.nio.file.Path createFile​(java.nio.file.Path path,
                                                    java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.createFile(Path, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createLink

        public static java.nio.file.Path createLink​(java.nio.file.Path link,
                                                    java.nio.file.Path existing)
        Delegates to Files.createLink(Path, Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        link - See delegate.
        existing - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createSymbolicLink

        public static java.nio.file.Path createSymbolicLink​(java.nio.file.Path link,
                                                            java.nio.file.Path target,
                                                            java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.createSymbolicLink(Path, Path, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        link - See delegate.
        target - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createTempDirectory

        public static java.nio.file.Path createTempDirectory​(java.nio.file.Path dir,
                                                             java.lang.String prefix,
                                                             java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.createTempDirectory(Path, String, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        dir - See delegate.
        prefix - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createTempDirectory

        public static java.nio.file.Path createTempDirectory​(java.lang.String prefix,
                                                             java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.createTempDirectory(String, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        prefix - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createTempFile

        public static java.nio.file.Path createTempFile​(java.nio.file.Path dir,
                                                        java.lang.String prefix,
                                                        java.lang.String suffix,
                                                        java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.createTempFile(Path, String, String, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        dir - See delegate.
        prefix - See delegate.
        suffix - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • createTempFile

        public static java.nio.file.Path createTempFile​(java.lang.String prefix,
                                                        java.lang.String suffix,
                                                        java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.createTempFile(String, String, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        prefix - See delegate.
        suffix - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • delete

        public static void delete​(java.nio.file.Path path)
        Delegates to Files.delete(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • deleteIfExists

        public static boolean deleteIfExists​(java.nio.file.Path path)
        Delegates to Files.deleteIfExists(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • getAttribute

        public static java.lang.Object getAttribute​(java.nio.file.Path path,
                                                    java.lang.String attribute,
                                                    java.nio.file.LinkOption... options)
        Delegates to Files.getAttribute(Path, String, LinkOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        attribute - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • getFileStore

        public static java.nio.file.FileStore getFileStore​(java.nio.file.Path path)
        Delegates to Files.getFileStore(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • getLastModifiedTime

        public static java.nio.file.attribute.FileTime getLastModifiedTime​(java.nio.file.Path path,
                                                                           java.nio.file.LinkOption... options)
        Delegates to Files.getLastModifiedTime(Path, LinkOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • getOwner

        public static java.nio.file.attribute.UserPrincipal getOwner​(java.nio.file.Path path,
                                                                     java.nio.file.LinkOption... options)
        Delegates to Files.getOwner(Path, LinkOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • getPosixFilePermissions

        public static java.util.Set<java.nio.file.attribute.PosixFilePermission> getPosixFilePermissions​(java.nio.file.Path path,
                                                                                                         java.nio.file.LinkOption... options)
        Delegates to Files.getPosixFilePermissions(Path, LinkOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • isHidden

        public static boolean isHidden​(java.nio.file.Path path)
        Delegates to Files.isHidden(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • isSameFile

        public static boolean isSameFile​(java.nio.file.Path path,
                                         java.nio.file.Path path2)
        Delegates to Files.isSameFile(Path, Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        path2 - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • lines

        public static java.util.stream.Stream<java.lang.String> lines​(java.nio.file.Path path)
        Delegates to Files.lines(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • lines

        public static java.util.stream.Stream<java.lang.String> lines​(java.nio.file.Path path,
                                                                      java.nio.charset.Charset cs)
        Delegates to Files.lines(Path, Charset) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        cs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • list

        public static java.util.stream.Stream<java.nio.file.Path> list​(java.nio.file.Path dir)
        Delegates to Files.list(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        dir - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • move

        public static java.nio.file.Path move​(java.nio.file.Path source,
                                              java.nio.file.Path target,
                                              java.nio.file.CopyOption... options)
        Delegates to Files.move(Path, Path, CopyOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        source - See delegate.
        target - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • newBufferedReader

        public static java.io.BufferedReader newBufferedReader​(java.nio.file.Path path)
        Delegates to Files.newBufferedReader(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • newBufferedReader

        public static java.io.BufferedReader newBufferedReader​(java.nio.file.Path path,
                                                               java.nio.charset.Charset cs)
        Delegates to Files.newBufferedReader(Path, Charset) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        cs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • newBufferedWriter

        public static java.io.BufferedWriter newBufferedWriter​(java.nio.file.Path path,
                                                               java.nio.charset.Charset cs,
                                                               java.nio.file.OpenOption... options)
        Delegates to Files.newBufferedWriter(Path, Charset, OpenOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        cs - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • newBufferedWriter

        public static java.io.BufferedWriter newBufferedWriter​(java.nio.file.Path path,
                                                               java.nio.file.OpenOption... options)
        Delegates to Files.newBufferedWriter(Path, OpenOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • newByteChannel

        public static java.nio.channels.SeekableByteChannel newByteChannel​(java.nio.file.Path path,
                                                                           java.nio.file.OpenOption... options)
        Delegates to Files.newByteChannel(Path, OpenOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        options - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • newByteChannel

        public static java.nio.channels.SeekableByteChannel newByteChannel​(java.nio.file.Path path,
                                                                           java.util.Set<? extends java.nio.file.OpenOption> options,
                                                                           java.nio.file.attribute.FileAttribute<?>... attrs)
        Delegates to Files.newByteChannel(Path, Set, FileAttribute...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        options - See delegate.
        attrs - See delegate.
        Returns:
        See delegate.
        Throws:
        java.io.UncheckedIOException - Wraps an IOException.
      • newDirectoryStream

        public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path dir)
        Delegates to Files.newDirectoryStream(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        dir - See delegate.
        Returns:
        See delegate.
      • newDirectoryStream

        public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path dir,
                                                                                           java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)
        Delegates to Files.newDirectoryStream(Path, java.nio.file.DirectoryStream.Filter) throwing UncheckedIOException instead of IOException.
        Parameters:
        dir - See delegate.
        filter - See delegate.
        Returns:
        See delegate.
      • newDirectoryStream

        public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path dir,
                                                                                           java.lang.String glob)
        Delegates to Files.newDirectoryStream(Path, String) throwing UncheckedIOException instead of IOException.
        Parameters:
        dir - See delegate.
        glob - See delegate.
        Returns:
        See delegate.
      • newInputStream

        public static java.io.InputStream newInputStream​(java.nio.file.Path path,
                                                         java.nio.file.OpenOption... options)
        Delegates to Files.newInputStream(Path, OpenOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • newOutputStream

        public static java.io.OutputStream newOutputStream​(java.nio.file.Path path,
                                                           java.nio.file.OpenOption... options)
        Delegates to Files.newOutputStream(Path, OpenOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • probeContentType

        public static java.lang.String probeContentType​(java.nio.file.Path path)
        Delegates to Files.probeContentType(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
      • readAllBytes

        public static byte[] readAllBytes​(java.nio.file.Path path)
        Delegates to Files.readAllBytes(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
      • readAllLines

        public static java.util.List<java.lang.String> readAllLines​(java.nio.file.Path path)
        Delegates to Files.readAllLines(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
      • readAllLines

        public static java.util.List<java.lang.String> readAllLines​(java.nio.file.Path path,
                                                                    java.nio.charset.Charset cs)
        Delegates to Files.readAllLines(Path, Charset) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        cs - See delegate.
        Returns:
        See delegate.
      • readAttributes

        public static <A extends java.nio.file.attribute.BasicFileAttributes> A readAttributes​(java.nio.file.Path path,
                                                                                               java.lang.Class<A> type,
                                                                                               java.nio.file.LinkOption... options)
        Delegates to Files.readAttributes(Path, Class, LinkOption...) throwing UncheckedIOException instead of IOException.
        Type Parameters:
        A - See delegate.
        Parameters:
        path - See delegate.
        type - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • readAttributes

        public static java.util.Map<java.lang.String,​java.lang.Object> readAttributes​(java.nio.file.Path path,
                                                                                            java.lang.String attributes,
                                                                                            java.nio.file.LinkOption... options)
        Delegates to Files.readAttributes(Path, String, LinkOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        attributes - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • readSymbolicLink

        public static java.nio.file.Path readSymbolicLink​(java.nio.file.Path link)
        Delegates to Files.readSymbolicLink(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        link - See delegate.
        Returns:
        See delegate.
      • setAttribute

        public static java.nio.file.Path setAttribute​(java.nio.file.Path path,
                                                      java.lang.String attribute,
                                                      java.lang.Object value,
                                                      java.nio.file.LinkOption... options)
        Delegates to Files.setAttribute(Path, String, Object, LinkOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        attribute - See delegate.
        value - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • setLastModifiedTime

        public static java.nio.file.Path setLastModifiedTime​(java.nio.file.Path path,
                                                             java.nio.file.attribute.FileTime time)
        Delegates to Files.setLastModifiedTime(Path, FileTime) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        time - See delegate.
        Returns:
        See delegate.
      • setOwner

        public static java.nio.file.Path setOwner​(java.nio.file.Path path,
                                                  java.nio.file.attribute.UserPrincipal owner)
        Delegates to Files.setOwner(Path, UserPrincipal) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        owner - See delegate.
        Returns:
        See delegate.
      • setPosixFilePermissions

        public static java.nio.file.Path setPosixFilePermissions​(java.nio.file.Path path,
                                                                 java.util.Set<java.nio.file.attribute.PosixFilePermission> perms)
        Delegates to Files.setPosixFilePermissions(Path, Set) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        perms - See delegate.
        Returns:
        See delegate.
      • size

        public static long size​(java.nio.file.Path path)
        Delegates to Files.size(Path) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        Returns:
        See delegate.
      • walk

        public static java.util.stream.Stream<java.nio.file.Path> walk​(java.nio.file.Path start,
                                                                       java.nio.file.FileVisitOption... options)
        Delegates to Files.walk(Path, FileVisitOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        start - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • walk

        public static java.util.stream.Stream<java.nio.file.Path> walk​(java.nio.file.Path start,
                                                                       int maxDepth,
                                                                       java.nio.file.FileVisitOption... options)
        Delegates to Files.walk(Path, int, FileVisitOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        start - See delegate.
        maxDepth - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • walkFileTree

        public static java.nio.file.Path walkFileTree​(java.nio.file.Path start,
                                                      java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)
        Delegates to Files.walkFileTree(Path, FileVisitor) throwing UncheckedIOException instead of IOException.
        Parameters:
        start - See delegate.
        visitor - See delegate.
        Returns:
        See delegate.
      • walkFileTree

        public static java.nio.file.Path walkFileTree​(java.nio.file.Path start,
                                                      java.util.Set<java.nio.file.FileVisitOption> options,
                                                      int maxDepth,
                                                      java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)
        Delegates to Files.walkFileTree(Path, Set, int, FileVisitor) throwing UncheckedIOException instead of IOException.
        Parameters:
        start - See delegate.
        options - See delegate.
        maxDepth - See delegate.
        visitor - See delegate.
        Returns:
        See delegate.
      • write

        public static java.nio.file.Path write​(java.nio.file.Path path,
                                               byte[] bytes,
                                               java.nio.file.OpenOption... options)
        Delegates to Files.write(Path, byte[], OpenOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        bytes - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • write

        public static java.nio.file.Path write​(java.nio.file.Path path,
                                               java.lang.Iterable<? extends java.lang.CharSequence> lines,
                                               java.nio.charset.Charset cs,
                                               java.nio.file.OpenOption... options)
        Delegates to Files.write(Path, Iterable, Charset, OpenOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        lines - See delegate.
        cs - See delegate.
        options - See delegate.
        Returns:
        See delegate.
      • write

        public static java.nio.file.Path write​(java.nio.file.Path path,
                                               java.lang.Iterable<? extends java.lang.CharSequence> lines,
                                               java.nio.file.OpenOption... options)
        Delegates to Files.write(Path, Iterable, OpenOption...) throwing UncheckedIOException instead of IOException.
        Parameters:
        path - See delegate.
        lines - See delegate.
        options - See delegate.
        Returns:
        See delegate.