Class PathMatchers


  • final class PathMatchers
    extends java.lang.Object
    PathMatcher factory for any file system.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  PathMatchers.RegexPathMatcher
      PathMatcher that matches the toString() form of a Path against a regex Pattern.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PathMatchers()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.nio.file.PathMatcher fromRegex​(java.lang.String regex, java.lang.Iterable<PathNormalization> normalizations)  
      static java.nio.file.PathMatcher getPathMatcher​(java.lang.String syntaxAndPattern, java.lang.String separators, com.google.common.collect.ImmutableSet<PathNormalization> normalizations)
      Gets a PathMatcher for the given syntax and pattern as specified by FileSystem.getPathMatcher(java.lang.String).
      • Methods inherited from class java.lang.Object

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

      • PathMatchers

        private PathMatchers()
    • Method Detail

      • getPathMatcher

        public static java.nio.file.PathMatcher getPathMatcher​(java.lang.String syntaxAndPattern,
                                                               java.lang.String separators,
                                                               com.google.common.collect.ImmutableSet<PathNormalization> normalizations)
        Gets a PathMatcher for the given syntax and pattern as specified by FileSystem.getPathMatcher(java.lang.String). The separators string contains the path name element separators (one character each) recognized by the file system. For a glob-syntax path matcher, any of the given separators will be recognized as a separator in the pattern, and any of them will be matched as a separator when checking a path.
      • fromRegex

        private static java.nio.file.PathMatcher fromRegex​(java.lang.String regex,
                                                           java.lang.Iterable<PathNormalization> normalizations)