public abstract class BaseDir extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BASE_DIR_MARKER_FILE_PATH
The default name for the base dir sentinel properties file.
|
| Modifier and Type | Method and Description |
|---|---|
static Path |
find()
Finds the “directory” on the classpath that contains a file called
.ratpack. |
static Path |
find(String markerFilePath)
Finds the “directory” on the classpath that contains the marker file at the given path.
|
public static final String DEFAULT_BASE_DIR_MARKER_FILE_PATH
Value: ".ratpack"
find(),
Constant Field Valuespublic static Path find()
.ratpack.
Calling this method is equivalent to calling findBaseDir(".ratpack").
find(String)public static Path find(String markerFilePath)
The classpath search is performed using ClassLoader.getResource(String) using the current thread's context class loader.
If the resource is not found, an IllegalStateException will be thrown.
If the resource is found, the enclosing directory of the resource will be converted to a Path and returned.
This allows a directory within side a JAR (that is on the classpath) to be used as the base dir potentially.
markerFilePath - the path to the marker file on the classpath