Class FileSet
java.lang.Object
io.vertx.config.spi.utils.FileSet
Utility class to manage file set selected using a pattern.
- Author:
- Clement Escoffier
-
Constructor Summary
ConstructorsConstructorDescriptionFileSet(Vertx vertx, File root, JsonObject set) Creates a newFileSetfrom a json object. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildConfiguration(List<File> files, Handler<AsyncResult<JsonObject>> handler) Iterates over the given set of files, and for each matching file, computes the resulting configuration.static booleanTests whether or not a string matches against a pattern.List all the files from a directory (recursive)
-
Constructor Details
-
FileSet
Creates a newFileSetfrom a json object.- Parameters:
vertx- the Vert.x instanceroot- the root of the fileset (directory)set- the configuration
-
-
Method Details
-
match
Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character- Parameters:
pattern- The pattern to match against. Must not benull.str- The string which must be matched against the pattern. Must not benull.isCaseSensitive- Whether or not matching should be performed case sensitively.- Returns:
trueif the string matches against the pattern, orfalseotherwise.
-
buildConfiguration
Iterates over the given set of files, and for each matching file, computes the resulting configuration. The given handler is called with the merged configuration (containing the configuration obtained by merging the configuration from all matching files).- Parameters:
files- the list of fileshandler- the handler called with the computed configuration
-
traverse
-