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.

@FunctionalInterface public interface FileNotFoundAction
Defines the action to perform when the file is not found.
  • Field Details

  • Method Details

    • run

      boolean run(Path file, ConfigFormat<?> configFormat) throws IOException
      Performs the action.
      Returns:
      true to parse the file, false to stop after the action's execution (thus making the config empty)
      Throws:
      IOException - if an IO error occurs
    • copyData

      static FileNotFoundAction copyData(URL url)
      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

      static FileNotFoundAction copyData(File file)
      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

      static FileNotFoundAction copyData(Path file)
      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

      static FileNotFoundAction copyData(InputStream data)
      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

      static FileNotFoundAction copyResource(String resourcePath)
      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: