Interface PathPattern


public interface PathPattern
A path pattern that represents a variant of glob. For example:
  • "/**" - all files
  • "*.json" - all JSON files
  • "/foo/*.json" - all JSON files under the directory /foo
  • "/*/foo.txt" - all files named foo.txt at the second depth level
  • "*.json","/bar/*.txt" - if you have more than one pattern you can supply them as varargs or Iterable. A file will be matched if any pattern matches.
  • Method Summary

    Modifier and Type
    Method
    Description
    all()
    Returns the path pattern that represents all files.
    Returns the encoded patternString() which just encodes a space to '%20'.
    of(Iterable<String> patterns)
    Creates a path pattern with the patterns.
    of(String... patterns)
    Creates a path pattern with the patterns.
    Returns the path pattern that concatenates the patterns using ','.
  • Method Details

    • all

      static PathPattern all()
      Returns the path pattern that represents all files.
    • of

      static PathPattern of(String... patterns)
      Creates a path pattern with the patterns.
    • of

      static PathPattern of(Iterable<String> patterns)
      Creates a path pattern with the patterns.
    • patternString

      String patternString()
      Returns the path pattern that concatenates the patterns using ','.
    • encoded

      String encoded()
      Returns the encoded patternString() which just encodes a space to '%20'.