public final class FindResources
extends java.lang.Object
Constructor and Description |
---|
FindResources() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
findFolder(boolean exists,
java.lang.String property,
java.lang.String... candidates)
Search for a folder.
|
static java.io.File |
findFolder(java.lang.String property,
java.lang.String... candidates) |
static java.io.File |
getExampleDirectory() |
static <T> java.nio.file.Path |
getResource(java.lang.String path) |
static <T> java.nio.file.Path |
getResource(java.lang.String path,
java.lang.Class<T> clazz) |
static <T> java.util.List<java.nio.file.Path> |
getResources(java.lang.String path) |
static <T> java.util.List<java.nio.file.Path> |
getResources(java.lang.String path,
java.lang.Class<T> clazz)
List directory contents for a resource folder.
|
static java.io.File |
getTacletProofsDirectory() |
static java.io.File |
getTestCasesDirectory() |
static java.io.File |
getTestResourcesDirectory() |
static java.io.File |
getTestResultForRunAllProofs() |
public static <T> java.util.List<java.nio.file.Path> getResources(java.lang.String path, java.lang.Class<T> clazz) throws java.net.URISyntaxException, java.io.IOException
clazz
- Any java class that lives in the same place as the resources you want.path
- Should end with "/", but not start with one.java.net.URISyntaxException
java.io.IOException
public static <T> java.util.List<java.nio.file.Path> getResources(java.lang.String path) throws java.net.URISyntaxException, java.io.IOException
java.net.URISyntaxException
java.io.IOException
public static <T> java.nio.file.Path getResource(java.lang.String path, java.lang.Class<T> clazz) throws java.net.URISyntaxException, java.io.IOException
java.net.URISyntaxException
java.io.IOException
public static <T> java.nio.file.Path getResource(java.lang.String path) throws java.net.URISyntaxException, java.io.IOException
java.net.URISyntaxException
java.io.IOException
public static java.io.File findFolder(java.lang.String property, java.lang.String... candidates)
property
- candidates
- public static java.io.File findFolder(boolean exists, java.lang.String property, java.lang.String... candidates)
The folder is searched by a value given via java system properties or by a list of candidates.
You can specify whether the folder should exists or not. If the should exists the method could return null.
property
- a key for System.getProperty(String)
exists
- flag whether the folder should existscandidates
- a list of candidates, used if propertyName
is not set by the userpublic static java.io.File getExampleDirectory()
public static java.io.File getTestResultForRunAllProofs()
public static java.io.File getTestCasesDirectory()
public static java.io.File getTestResourcesDirectory()
public static java.io.File getTacletProofsDirectory()
Copyright © 2003-2019 The KeY-Project.