Class TemporaryFilesystem

java.lang.Object
org.openqa.selenium.io.TemporaryFilesystem

public class TemporaryFilesystem extends Object
A wrapper around temporary filesystem behaviour.
  • Method Details

    • getDefaultTmpFS

      public static TemporaryFilesystem getDefaultTmpFS()
    • setTemporaryDirectory

      public static void setTemporaryDirectory(File directory)
    • getTmpFsBasedOn

      public static TemporaryFilesystem getTmpFsBasedOn(File directory)
    • createTempDir

      public File createTempDir(String prefix, String suffix)
      Create a temporary directory, and track it for deletion.
      Parameters:
      prefix - the prefix to use when creating the temporary directory
      suffix - the suffix to use when creating the temporary directory
      Returns:
      the temporary directory to create
    • deleteTempDir

      public void deleteTempDir(File file)
      Delete a temporary directory that we were responsible for creating.
      Parameters:
      file - the file to delete
    • deleteTemporaryFiles

      public void deleteTemporaryFiles()
      Perform the operation that a shutdown hook would have.
    • deleteBaseDir

      public boolean deleteBaseDir()
    • getBaseDir

      public File getBaseDir()