Package org.nuxeo.common.utils
Class FileMatcher
- java.lang.Object
-
- org.nuxeo.common.utils.FileMatcher
-
public class FileMatcher extends Object
- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description FileMatcher(Pattern pattern, String key)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getKey()
static FileMatcher
getMatcher(File file)
static FileMatcher
getMatcher(String path)
static File
getMatchingFile(String path, Map<String,Object> map)
Look for a matching file for the given path.Pattern
getPattern()
String
getValue()
boolean
match(String name)
-
-
-
Method Detail
-
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)
-
-