@FunctionalInterface
public interface FileNotFoundAction
| Modifier and Type | Field and Description |
|---|---|
static FileNotFoundAction |
CREATE_EMPTY |
static FileNotFoundAction |
READ_NOTHING |
static FileNotFoundAction |
THROW_ERROR |
| Modifier and Type | Method and Description |
|---|---|
static FileNotFoundAction |
copyData(java.io.File file)
Action: copies the specified file.
|
static FileNotFoundAction |
copyData(java.io.InputStream data)
Action: copies the stream's data.
|
static FileNotFoundAction |
copyData(java.nio.file.Path file)
Action: copies the specified file.
|
static FileNotFoundAction |
copyData(java.net.URL url)
Action: copies the data at the given url.
|
static FileNotFoundAction |
copyResource(java.lang.String resourcePath)
Action: copies the inner resource.
|
boolean |
run(java.nio.file.Path file,
ConfigFormat<?> configFormat)
Performs the action.
|
static final FileNotFoundAction CREATE_EMPTY
static final FileNotFoundAction READ_NOTHING
static final FileNotFoundAction THROW_ERROR
boolean run(java.nio.file.Path file,
ConfigFormat<?> configFormat)
throws java.io.IOException
true to parse the file, false to stop after the action's execution
(thus making the config empty)java.io.IOException - if an IO error occursstatic FileNotFoundAction copyData(java.net.URL url)
url - the data urlstatic FileNotFoundAction copyData(java.io.File file)
file - the data urlstatic FileNotFoundAction copyData(java.nio.file.Path file)
file - the data urlstatic FileNotFoundAction copyData(java.io.InputStream data)
data - the stream containing the datastatic FileNotFoundAction copyResource(java.lang.String resourcePath)
resourcePath - the resource's pathClass.getResource(String)