diff options
Diffstat (limited to 'dice-lang/src/bjc/dicelang/util/ResourceLoader.java')
| -rw-r--r-- | dice-lang/src/bjc/dicelang/util/ResourceLoader.java | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/dice-lang/src/bjc/dicelang/util/ResourceLoader.java b/dice-lang/src/bjc/dicelang/util/ResourceLoader.java deleted file mode 100644 index db5c6fc..0000000 --- a/dice-lang/src/bjc/dicelang/util/ResourceLoader.java +++ /dev/null @@ -1,43 +0,0 @@ -package bjc.dicelang.util; - -import static bjc.dicelang.Errors.ErrorKey.EK_MISC_IOEX; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.net.URL; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; - -import bjc.dicelang.Errors; - -/** - * Load resources bundled with DiceLang. - * - * @author EVE - * - */ -public class ResourceLoader { - /** - * Loads a .help file from the data/help directory. - * - * @param name - * The name of the help file to load. - * - * @return The contents of the help file, or null if it could not be - * opened. - */ - public static String[] loadHelpFile(final String name) { - final URL fle = ResourceLoader.class.getResource("/data/help/" + name + ".help"); - - try { - Path pth = Paths.get(fle.toURI()); - - return Files.lines(pth).toArray(sze -> new String[sze]); - } catch (IOException | URISyntaxException ioex) { - Errors.inst.printError(EK_MISC_IOEX, fle.toString()); - } - - return null; - } -} |
