Interface FileNotFoundAction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Defines the action to perform when the file is not found.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FileNotFoundActionstatic final FileNotFoundActionstatic final FileNotFoundAction -
Method Summary
Modifier and TypeMethodDescriptionstatic FileNotFoundActionAction: copies the specified file.static FileNotFoundActioncopyData(InputStream data) Action: copies the stream's data.static FileNotFoundActionAction: copies the data at the given url.static FileNotFoundActionAction: copies the specified file.static FileNotFoundActioncopyResource(String resourcePath) Action: copies the inner resource.booleanrun(Path file, ConfigFormat<?> configFormat) Performs the action.
-
Field Details
-
CREATE_EMPTY
-
READ_NOTHING
-
THROW_ERROR
-
-
Method Details
-
run
Performs the action.- Returns:
trueto parse the file,falseto stop after the action's execution (thus making the config empty)- Throws:
IOException- if an IO error occurs
-
copyData
Action: copies the data at the given url.- Parameters:
url- the data url- Returns:
- a FileNotFoundAction that copies the url's data if the file is not found
-
copyData
Action: copies the specified file.- Parameters:
file- the data url- Returns:
- a FileNotFoundAction that copies the file's data if the file is not found
-
copyData
Action: copies the specified file.- Parameters:
file- the data url- Returns:
- a FileNotFoundAction that copies the file's data if the file is not found
-
copyData
Action: copies the stream's data.- Parameters:
data- the stream containing the data- Returns:
- a FileNotFoundAction that copies the stream's data if the file is not found
-
copyResource
Action: copies the inner resource.- Parameters:
resourcePath- the resource's path- Returns:
- a FileNotFoundAction that copies the url's data if the file is not found
- See Also:
-