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
pattern
is a valid classpath resource, load the singleSource
from there - If
pattern
is a valid file on the file system, load the singleSource
from there - Match all files on the file system according to
pattern
(interpreted as an ant-style file pattern), and load all of theSource
items 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
Modifier and TypeClassDescriptionstatic enum
The sort algorithm to be applied to directory contents. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal File
basedir()
final FilePattern
collect()
Retrieve a set ofSource
items from this pattern.final String
encoding()
final FilePattern
final Comparator
<File> static final Comparator
<File> final void
Load a set ofSource
items from this pattern.final boolean
Whether a given path matches the pattern.final String
final File
final String
pattern()
final FilePattern
final FilePattern.Sort
sort()
final FilePattern
sort
(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 ofSource
items from this pattern.- Throws:
IOException
- if something goes wrong while loading file contents.
-
load
Load a set ofSource
items from this pattern.- Throws:
IOException
- if something goes wrong while loading file contents.
-
toString
-