Class FileMatcher

java.lang.Object
org.nuxeo.common.utils.FileMatcher

public class FileMatcher extends Object
Author:
Bogdan Stefanescu
  • Field Details

    • pattern

      protected final Pattern pattern
    • key

      protected final String key
    • value

      protected String value
  • Constructor Details

  • Method Details

    • getMatcher

      public static FileMatcher getMatcher(String path)
    • getMatcher

      public static FileMatcher getMatcher(File file)
    • getMatchingFile

      public static File getMatchingFile(String path, Map<String,Object> map)
      Look for a matching file for the given path.
      Parameters:
      path - Searched file path, optionally including the pattern.
      map - The pattern variable will be put in the given map if any. Since 5.5, map can be null.
      Returns:
      File found. Null if none.
    • getKey

      public String getKey()
    • getPattern

      public Pattern getPattern()
    • getValue

      public String getValue()
    • match

      public boolean match(String name)