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) |
void |
assertFileExistence(File dir,
String filename,
boolean shouldExist) |
void |
cleanUp() |
File |
createFile(File dir,
String filename,
String contents)
NOTE: the file content is written using platform encoding.
|
File |
createFile(String filename,
String content) |
File |
createTempDir() |
File |
createTempFile() |
protected void |
finalize() |
String |
getFileContents(File file)
NOTE: the file content is read using platform 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()
public void assertFileContents(File dir, String filename, String contentsTest) throws IOException
IOException
public File createFile(File dir, String filename, String contents) throws IOException
IOException
public String getFileContents(File file) throws IOException
IOException
protected void finalize() throws Throwable
public File createFile(String filename, String content) throws IOException
IOException
Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.