Package org.openqa.selenium.io
Class TemporaryFilesystem
java.lang.Object
org.openqa.selenium.io.TemporaryFilesystem
A wrapper around temporary filesystem behaviour.
-
Method Summary
Modifier and TypeMethodDescriptioncreateTempDir
(String prefix, String suffix) Create a temporary directory, and track it for deletion.boolean
void
deleteTempDir
(File file) Delete a temporary directory that we were responsible for creating.void
Perform the operation that a shutdown hook would have.static TemporaryFilesystem
static TemporaryFilesystem
getTmpFsBasedOn
(File directory) static void
setTemporaryDirectory
(File directory)
-
Method Details
-
getDefaultTmpFS
-
setTemporaryDirectory
-
getTmpFsBasedOn
-
createTempDir
Create a temporary directory, and track it for deletion.- Parameters:
prefix
- the prefix to use when creating the temporary directorysuffix
- the suffix to use when creating the temporary directory- Returns:
- the temporary directory to create
-
deleteTempDir
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
-