info.informatica.io
Class FilePatternSpec
java.lang.Object
info.informatica.io.FilePatternSpec
public class FilePatternSpec
- extends Object
Uses two properties to specify wildcard behavior:
- file.anychar: Like the DOS "?" wildcard, matches one character.
- file.anystr: The typical "*" wildcard, matches any character(s) in a file.
- Author:
- Carlos Amengual (amengual at informatica.info)
FilePatternSpec
public FilePatternSpec(FilesystemInfo fsinfo)
- Constructor.
- Parameters:
fsinfo - the appropriate FilesystemInfo.
getNonWildcardPath
public String getNonWildcardPath(String path)
- Parameters:
path - The path with wildcards.
- Returns:
- the wildcard-free left part of wcpath.
getFirstWildcardPath
public String getFirstWildcardPath(String path)
- Parameters:
path - The path with wildcards.
- Returns:
- the path through (and including) the first appearance of the
wildcards.
hasWildcards
public boolean hasWildcards(String path)
- Tests if the given path or filename includes wildcards.
- Parameters:
path - the path to test.
- Returns:
- true if has wildcards, false otherwise.
getFilePattern
public FilePatternSpec.FilePattern getFilePattern(String patternPath)
- Parameters:
patternPath - Absolute path with wildcards.