Class NioFilesWrapper


  • public class NioFilesWrapper
    extends java.lang.Object
    Wrapper for Files to test Paths.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NioFilesWrapper()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean exists​(java.nio.file.Path path, java.nio.file.LinkOption... options)  
      (package private) static NioFilesWrapper instance()
      Returns the singleton instance of this class.
      boolean isDirectory​(java.nio.file.Path path)  
      boolean isExecutable​(java.nio.file.Path path)  
      boolean isReadable​(java.nio.file.Path path)  
      boolean isRegularFile​(java.nio.file.Path path)  
      boolean isSymbolicLink​(java.nio.file.Path path)  
      boolean isWritable​(java.nio.file.Path path)  
      java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path path, java.util.function.Predicate<java.nio.file.Path> matcher)  
      java.io.InputStream newInputStream​(java.nio.file.Path path, java.nio.file.OpenOption... options)  
      boolean notExists​(java.nio.file.Path path, java.nio.file.LinkOption... options)  
      long size​(java.nio.file.Path path)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NioFilesWrapper

        private NioFilesWrapper()
    • Method Detail

      • instance

        static NioFilesWrapper instance()
        Returns the singleton instance of this class.
        Returns:
        the singleton instance of this class.
      • isRegularFile

        public boolean isRegularFile​(java.nio.file.Path path)
      • isSymbolicLink

        public boolean isSymbolicLink​(java.nio.file.Path path)
      • isDirectory

        public boolean isDirectory​(java.nio.file.Path path)
      • exists

        public boolean exists​(java.nio.file.Path path,
                              java.nio.file.LinkOption... options)
      • notExists

        public boolean notExists​(java.nio.file.Path path,
                                 java.nio.file.LinkOption... options)
      • isReadable

        public boolean isReadable​(java.nio.file.Path path)
      • isWritable

        public boolean isWritable​(java.nio.file.Path path)
      • isExecutable

        public boolean isExecutable​(java.nio.file.Path path)
      • newInputStream

        public java.io.InputStream newInputStream​(java.nio.file.Path path,
                                                  java.nio.file.OpenOption... options)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • newDirectoryStream

        public java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path path,
                                                                                    java.util.function.Predicate<java.nio.file.Path> matcher)
                                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • size

        public long size​(java.nio.file.Path path)
                  throws java.io.IOException
        Throws:
        java.io.IOException