X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FDebugLoaders.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FDebugLoaders.java;h=1daa18a0d921ab83cc6fdae670c4ff00b046bf80;hb=2f21e4a2402f1c7a55175f223118521dbd2d27d8;hp=0000000000000000000000000000000000000000;hpb=48e66da8526834b24b80551819321e9a14fd1c8f;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/main/DebugLoaders.java b/src/main/java/net/pterodactylus/sone/main/DebugLoaders.java new file mode 100644 index 0000000..1daa18a --- /dev/null +++ b/src/main/java/net/pterodactylus/sone/main/DebugLoaders.java @@ -0,0 +1,26 @@ +package net.pterodactylus.sone.main; + +import java.io.File; + +import net.pterodactylus.sone.template.FilesystemTemplate; +import net.pterodactylus.util.template.Template; + +/** + * {@link Loaders} implementation that loads all resources from the filesystem. + * + * @author David ‘Bombe’ Roden + */ +public class DebugLoaders implements Loaders { + + private final String filesystemPath; + + public DebugLoaders(String filesystemPath) { + this.filesystemPath = filesystemPath; + } + + @Override + public Template loadTemplate(String path) { + return new FilesystemTemplate(new File(filesystemPath, path).getAbsolutePath()); + } + +}