Package ch.grengine.sources
Class DirBasedSources
java.lang.Object
ch.grengine.sources.BaseSources
ch.grengine.sources.DirBasedSources
- All Implemented Interfaces:
Sources
Sources based on a directory with script files.
Script file extensions and whether to also scan subdirectories is configurable.
The implementation is basic, but may still be good enough for many use cases in practice: Invisible files, as well as invisible or unlistable directories, are ignored; no attempts are made to detect symlinks.
- Since:
- 1.0
- Author:
- Alain Stalder, Made in Switzerland.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDirBasedSources(DirBasedSources.Builder builder) constructor from builder. -
Method Summary
Modifier and TypeMethodDescriptiongets the builder.getDir()gets the script file directory.gets the dir mode.gets the set of script extensions.gets the updated source set.Methods inherited from class ch.grengine.sources.BaseSources
getCompilerFactory, getLastModified, getName, getSourceSet, init, toString
-
Constructor Details
-
DirBasedSources
constructor from builder.- Parameters:
builder- builder- Since:
- 1.0
-
-
Method Details
-
getSourceSetNew
gets the updated source set.- Specified by:
getSourceSetNewin classBaseSources- Returns:
- updated source set
- Since:
- 1.0
-
getDir
gets the script file directory.- Returns:
- script file directory
- Since:
- 1.0
-
getDirMode
gets the dir mode.- Returns:
- dir mode
- Since:
- 1.0
-
getScriptExtensions
gets the set of script extensions.- Returns:
- set of script extensions
- Since:
- 1.0
-
getBuilder
gets the builder.- Returns:
- builder
- Since:
- 1.0
-