public interface BaseDirBuilder extends Closeable
Modifier and Type | Method and Description |
---|---|
Path |
build()
Build the baseDir.
|
default Path |
build(Action<? super BaseDirBuilder> contents) |
default void |
build(Action<? super BaseDirBuilder> contents,
Action<? super Path> use) |
static BaseDirBuilder |
dir(File dir) |
Path |
dir(String path)
Creates a directory at the given path within the base dir.
|
Path |
file(String path)
Returns a path for the given path within the base dir.
|
Path |
file(String path,
String content)
Creates a file with the given string content at the given path within the base dir.
|
static BaseDirBuilder |
jar(File jarFile) |
static BaseDirBuilder |
tmpDir() |
static BaseDirBuilder |
tmpJar() |
static BaseDirBuilder tmpDir()
static BaseDirBuilder dir(File dir)
static BaseDirBuilder tmpJar()
static BaseDirBuilder jar(File jarFile)
default Path build(Action<? super BaseDirBuilder> contents) throws Exception
Exception
default void build(Action<? super BaseDirBuilder> contents, Action<? super Path> use) throws Exception
Exception
Path file(String path)
All parent directories will be created on demand.
path
- The relative path to the pathPath file(String path, String content)
All parent directories will be created on demand.
path
- The relative path to the file to createcontent
- The content to write to the filePath dir(String path)
All parent directories will be created on demand.
path
- The relative path to the file to createPath build()