Package ch.kk7.confij.source.resource
Class FileResource
java.lang.Object
ch.kk7.confij.source.resource.FileResource
- All Implemented Interfaces:
ConfijResource
public class FileResource extends java.lang.Object implements ConfijResource
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileResource.AnyFileResourceprotected static classFileResource.PathAndMatcherNested classes/interfaces inherited from interface ch.kk7.confij.source.resource.ConfijResource
ConfijResource.Defaults, ConfijResource.ResourceContent -
Constructor Summary
Constructors Constructor Description FileResource(java.lang.String fileTemplate) -
Method Summary
Modifier and Type Method Description protected static FileResource.PathAndMatcherextractGlob(java.lang.String path)protected java.lang.StringfileToStr(java.nio.file.Path path, java.nio.charset.Charset charset)protected java.util.List<java.nio.file.Path>getFilesMatching(@NonNull FileResource.PathAndMatcher query)static FileResourceofFile(java.io.File file)static FileResourceofFile(java.lang.String file)static FileResourceofPath(java.nio.file.Path file)java.util.stream.Stream<ConfijResource.ResourceContent>read(ValueResolver.StringResolver resolver)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.kk7.confij.source.resource.ConfijResource
read
-
Constructor Details
-
FileResource
public FileResource(java.lang.String fileTemplate)
-
-
Method Details
-
ofFile
-
ofFile
-
ofPath
-
extractGlob
-
getFilesMatching
protected java.util.List<java.nio.file.Path> getFilesMatching(@NonNull @NonNull FileResource.PathAndMatcher query) -
read
public java.util.stream.Stream<ConfijResource.ResourceContent> read(ValueResolver.StringResolver resolver)- Specified by:
readin interfaceConfijResource
-
fileToStr
protected java.lang.String fileToStr(java.nio.file.Path path, java.nio.charset.Charset charset)
-