Package org.oddjob.io
Class WildcardSpec
java.lang.Object
org.oddjob.io.WildcardSpec
Utility class for wild-card file matching. Note that the File objects
returned are all in the canonical file format.
-
Constructor Summary
ConstructorsConstructorDescriptionWildcardSpec(File file) Create a new instance with a file.WildcardSpec(String spec) Create a new instance with a String file path. -
Method Summary
Modifier and TypeMethodDescriptionFile[]Find all files matching the specialisation.protected File[]findFiles(org.oddjob.io.WildcardSpec.DirectorySplit split) Recursively find file in the path.booleanIs the file specification a wild card specification.static voidpossiblyRecursiveMatch(File from, String namespec, List<File> results)
-
Constructor Details
-
WildcardSpec
Create a new instance with a String file path.- Parameters:
spec-
-
WildcardSpec
Create a new instance with a file.- Parameters:
file-
-
-
Method Details
-
isWildcardSpec
public boolean isWildcardSpec()Is the file specification a wild card specification.- Returns:
-
findFiles
Find all files matching the specialisation.- Returns:
- Throws:
IOException
-
findFiles
Recursively find file in the path.- Parameters:
split- The path split up into wildcard sections.- Returns:
- Throws:
IOException
-
possiblyRecursiveMatch
-