java.lang.Object
org.jooq.FilePattern
A utility class that can traverse a directory structure given some ant-style
file patterns, or classpath resources.
The following algorithm is applied when traversing sources:
- If
patternis a valid classpath resource, load the singleSourcefrom there - If
patternis a valid file on the file system, load the singleSourcefrom there - Match all files on the file system according to
pattern(interpreted as an ant-style file pattern), and load all of theSourceitems givensort(). An example pattern issrc/main/resources/**/*.sql
This is INTERNAL API. Please do not use directly as API may change incompatibly.
- Author:
- Lukas Eder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe sort algorithm to be applied to directory contents. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Filebasedir()final FilePatterncollect()Retrieve a set ofSourceitems from this pattern.final Stringencoding()final FilePatternfinal Comparator<File> static final Comparator<File> final voidLoad a set ofSourceitems from this pattern.final booleanWhether a given path matches the pattern.final Stringfinal Filefinal Stringpattern()final FilePatternfinal FilePattern.Sortsort()final FilePatternsort(FilePattern.Sort newSort) toString()
-
Constructor Details
-
FilePattern
public FilePattern()
-
-
Method Details
-
sort
-
sort
-
basedir
-
basedir
-
pattern
-
pattern
-
encoding
-
encoding
-
fileComparator
-
fileComparator
-
matches
Whether a given path matches the pattern. -
path
-
pathFile
-
collect
Retrieve a set ofSourceitems from this pattern.- Throws:
IOException- if something goes wrong while loading file contents.
-
load
Load a set ofSourceitems from this pattern.- Throws:
IOException- if something goes wrong while loading file contents.
-
toString
-