Package eu.bandm.tools.util.files
Class SourceHabitats.SourceHabitat_file
java.lang.Object
eu.bandm.tools.util.files.SourceHabitats.SourceHabitat
eu.bandm.tools.util.files.SourceHabitats.SourceHabitat_file
- Enclosing class:
SourceHabitats
Represents a source habitat which is a directory in the file system.
All resources searched for must be files addressable from this directory.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected File
Start point of the file tree represented by this habitat.Fields inherited from class eu.bandm.tools.util.files.SourceHabitats.SourceHabitat
name, ok
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @Opt SourceHabitats.FoundSource
test_idExt
(String id, @Opt BiConsumer<String, Object[]> verbose, String ext) Searches for the resource with the given name and suffix.Methods inherited from class eu.bandm.tools.util.files.SourceHabitats.SourceHabitat
test_for_inputStream
-
Field Details
-
pathAsFile
Start point of the file tree represented by this habitat.
-
-
Constructor Details
-
SourceHabitat_file
Only constructor.- Parameters:
name
- defines the start point where to look for sources, seeSourceHabitats.SourceHabitat
.
-
-
Method Details
-
test_idExt
@Opt protected @Opt SourceHabitats.FoundSource test_idExt(String id, @Opt @Opt BiConsumer<String, Object[]> verbose, String ext) Description copied from class:SourceHabitats.SourceHabitat
Searches for the resource with the given name and suffix. This must be implemented differently for different kinds of Habitats. Fills in the found stream and "location" into the aSourceHabitats.FoundSource
object.- Specified by:
test_idExt
in classSourceHabitats.SourceHabitat
- Parameters:
id
- name of the resource searched forverbose
- the target of log messagesext
- extension of the resource name / file name. It must include the leading dot (=".") or be completely empty.- Returns:
- the found resource or null if no such exists.
-