Class Fs


  • public abstract class Fs
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Fs()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.String externalize​(java.nio.file.Path path)  
      static java.nio.file.Path fileFromPath​(java.lang.String path)
      Deprecated.
      Use fromUrl(String) instead.
      static java.nio.file.FileSystem forJar​(java.net.URL url)  
      static java.nio.file.FileSystem forJar​(java.nio.file.Path jarFile)  
      static java.nio.file.Path fromUrl​(java.lang.String urlString)
      Use this method instead of Paths.get(String, String...) or Paths.get(URI).
      static java.nio.file.Path fromUrl​(java.net.URL url)
      Isn't this what Paths.get(URI) should do?
      static byte[] getBytes​(java.nio.file.Path path)  
      static java.io.InputStream getInputStream​(java.nio.file.Path path)  
      static java.nio.file.Path join​(java.nio.file.Path path, java.lang.String... pathParts)  
      static java.lang.String[] listFileNames​(java.nio.file.Path path)  
      static java.nio.file.Path[] listFiles​(java.nio.file.Path path)  
      static java.nio.file.Path[] listFiles​(java.nio.file.Path path, java.util.function.Predicate<java.nio.file.Path> filter)  
      static java.nio.file.Path newFile​(java.io.File file)
      Deprecated.
      Use File.toPath() instead.
      static java.net.URI toUri​(java.net.URL url)  
      • Methods inherited from class java.lang.Object

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

      • Fs

        public Fs()
    • Method Detail

      • newFile

        @Deprecated
        public static java.nio.file.Path newFile​(java.io.File file)
        Deprecated.
        Use File.toPath() instead.
      • fileFromPath

        @Deprecated
        public static java.nio.file.Path fileFromPath​(java.lang.String path)
        Deprecated.
        Use fromUrl(String) instead.
      • forJar

        public static java.nio.file.FileSystem forJar​(java.net.URL url)
      • forJar

        public static java.nio.file.FileSystem forJar​(java.nio.file.Path jarFile)
      • fromUrl

        public static java.nio.file.Path fromUrl​(java.lang.String urlString)
        Use this method instead of Paths.get(String, String...) or Paths.get(URI).

        Supports "file:path", "jar:file:jarfile.jar!/path", and plain old paths.

        For JAR files, automatically open and cache filesystems.

      • fromUrl

        public static java.nio.file.Path fromUrl​(java.net.URL url)
        Isn't this what Paths.get(URI) should do?
      • toUri

        public static java.net.URI toUri​(java.net.URL url)
      • getInputStream

        public static java.io.InputStream getInputStream​(java.nio.file.Path path)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getBytes

        public static byte[] getBytes​(java.nio.file.Path path)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • listFiles

        public static java.nio.file.Path[] listFiles​(java.nio.file.Path path)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • listFiles

        public static java.nio.file.Path[] listFiles​(java.nio.file.Path path,
                                                     java.util.function.Predicate<java.nio.file.Path> filter)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • listFileNames

        public static java.lang.String[] listFileNames​(java.nio.file.Path path)
      • join

        public static java.nio.file.Path join​(java.nio.file.Path path,
                                              java.lang.String... pathParts)
      • externalize

        public static java.lang.String externalize​(java.nio.file.Path path)