Class Vfs

    • Constructor Summary

      Constructors 
      Constructor Description
      Vfs()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addDefaultURLTypes​(Vfs.UrlType urlType)
      add a static default url types to the beginning of the default url types list.
      static java.lang.Iterable<Vfs.File> findFiles​(java.util.Collection<java.net.URL> inUrls, java.lang.String packagePrefix, java.util.function.Predicate<java.lang.String> nameFilter)
      return an iterable of all Vfs.File in given urls, starting with given packagePrefix and matching nameFilter
      static java.lang.Iterable<Vfs.File> findFiles​(java.util.Collection<java.net.URL> urls, java.util.function.Predicate<Vfs.File> filePredicate)
      return an iterable of all Vfs.File in given urls, matching filePredicate
      static Vfs.Dir fromURL​(java.net.URL url)
      tries to create a Dir from the given url, using the defaultUrlTypes
      static Vfs.Dir fromURL​(java.net.URL url, java.util.List<Vfs.UrlType> urlTypes)
      tries to create a Dir from the given url, using the given urlTypes
      static Vfs.Dir fromURL​(java.net.URL url, Vfs.UrlType... urlTypes)
      tries to create a Dir from the given url, using the given urlTypes
      static java.util.List<Vfs.UrlType> getDefaultUrlTypes()
      the default url types that will be used when issuing fromURL(java.net.URL)
      static java.io.File getFile​(java.net.URL url)
      try to get File from url
      private static boolean hasInnerJarFileInPath​(java.net.URL url)  
      private static boolean hasJarFileInPath​(java.net.URL url)  
      static void setDefaultURLTypes​(java.util.List<Vfs.UrlType> urlTypes)
      sets the static default url types.
      • Methods inherited from class java.lang.Object

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

      • defaultUrlTypes

        private static java.util.List<Vfs.UrlType> defaultUrlTypes
    • Constructor Detail

      • Vfs

        public Vfs()
    • Method Detail

      • getDefaultUrlTypes

        public static java.util.List<Vfs.UrlType> getDefaultUrlTypes()
        the default url types that will be used when issuing fromURL(java.net.URL)
      • setDefaultURLTypes

        public static void setDefaultURLTypes​(java.util.List<Vfs.UrlType> urlTypes)
        sets the static default url types. can be used to statically plug in urlTypes
      • addDefaultURLTypes

        public static void addDefaultURLTypes​(Vfs.UrlType urlType)
        add a static default url types to the beginning of the default url types list. can be used to statically plug in urlTypes
      • fromURL

        public static Vfs.Dir fromURL​(java.net.URL url)
        tries to create a Dir from the given url, using the defaultUrlTypes
      • fromURL

        public static Vfs.Dir fromURL​(java.net.URL url,
                                      java.util.List<Vfs.UrlType> urlTypes)
        tries to create a Dir from the given url, using the given urlTypes
      • fromURL

        public static Vfs.Dir fromURL​(java.net.URL url,
                                      Vfs.UrlType... urlTypes)
        tries to create a Dir from the given url, using the given urlTypes
      • findFiles

        public static java.lang.Iterable<Vfs.File> findFiles​(java.util.Collection<java.net.URL> inUrls,
                                                             java.lang.String packagePrefix,
                                                             java.util.function.Predicate<java.lang.String> nameFilter)
        return an iterable of all Vfs.File in given urls, starting with given packagePrefix and matching nameFilter
      • findFiles

        public static java.lang.Iterable<Vfs.File> findFiles​(java.util.Collection<java.net.URL> urls,
                                                             java.util.function.Predicate<Vfs.File> filePredicate)
        return an iterable of all Vfs.File in given urls, matching filePredicate
      • getFile

        public static java.io.File getFile​(java.net.URL url)
        try to get File from url
      • hasJarFileInPath

        private static boolean hasJarFileInPath​(java.net.URL url)
      • hasInnerJarFileInPath

        private static boolean hasInnerJarFileInPath​(java.net.URL url)