public class FileLoader extends ResourceLoader
| Modifier and Type | Method and Description |
|---|---|
static FileLoader |
get()
Get an instance of the loader.
|
java.io.File |
load(java.lang.String relativePath,
java.lang.Class outsideClass)
Load a file/directory from your resource folder using a relative path.
|
java.io.File |
load(java.lang.String relativePath,
java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions,
java.lang.Class outsideClass)
Load a file/directory from your resource folder with permissions
you set.
|
copyToTempDirectory, createMainTempDirectory, extractFromWithinAJarFile, getThePathToTheJarWeAreIn, isPosixCompliant, requestDeletion, setPermissions, setPermissions, urlToFile, urlToFilepublic static FileLoader get()
public java.io.File load(java.lang.String relativePath,
java.lang.Class outsideClass)
throws java.io.IOException,
java.net.URISyntaxException
relativePath - Relative path to your file or directory.java.io.IOException - If at any point processing of the resource file fails.java.net.URISyntaxException - If cannot find the resource file.public java.io.File load(java.lang.String relativePath,
java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions,
java.lang.Class outsideClass)
throws java.io.IOException,
java.net.URISyntaxException
relativePath - Relative path to your file or directory.permissions - A set of permissions.java.io.IOException - If at any point processing of the resource file fails.java.net.URISyntaxException - If cannot find the resource file.