public class TestFileManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TEMP_DIR_PATH |
Constructor and Description |
---|
TestFileManager(String baseFilename,
String fileSuffix) |
Modifier and Type | Method and Description |
---|---|
void |
assertFileContents(File dir,
String filename,
String contentsTest,
String encoding) |
void |
assertFileExistence(File dir,
String filename,
boolean shouldExist) |
void |
cleanUp() |
File |
createFile(File dir,
String filename,
String contents,
String encoding) |
File |
createFile(String filename,
String content,
String encoding) |
File |
createTempDir() |
File |
createTempFile() |
protected void |
finalize() |
String |
getFileContents(File file,
String encoding) |
void |
markForDeletion(File toDelete) |
public static final String TEMP_DIR_PATH
public void markForDeletion(File toDelete)
public File createTempDir()
public File createTempFile() throws IOException
IOException
public void cleanUp() throws IOException
IOException
public void assertFileContents(File dir, String filename, String contentsTest, String encoding) throws IOException
IOException
public File createFile(File dir, String filename, String contents, String encoding) throws IOException
IOException
public String getFileContents(File file, String encoding) throws IOException
IOException
protected void finalize() throws Throwable
public File createFile(String filename, String content, String encoding) throws IOException
IOException
Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.