java.lang.Object
io.helidon.webserver.testsupport.TemporaryFolder

public class TemporaryFolder extends Object
A helper class that represents a temporary folder.
  • Constructor Details

    • TemporaryFolder

      public TemporaryFolder()
  • Method Details

    • newFile

      public File newFile(String name) throws IOException
      Create a new regular file inside the root folder.
      Parameters:
      name - the name of the file to create
      Returns:
      the created File instance
      Throws:
      IOException - if an error occurred while create the file
      IllegalStateException - if the file already exist
    • newFolder

      public File newFolder(String name)
      Create a new directory inside the root folder.
      Parameters:
      name - the name of the directory to create
      Returns:
      the created File instance
    • root

      public File root()
      Return the root of the temporary folder.
      Returns:
      the File instance for the temporary folder root