org.apache.maven.artifact.testutils
Class TestFileManager
java.lang.Object
org.apache.maven.artifact.testutils.TestFileManager
public class TestFileManager
- extends Object
Method Summary |
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)
|
TEMP_DIR_PATH
public static final String TEMP_DIR_PATH
TestFileManager
public TestFileManager(String baseFilename,
String fileSuffix)
markForDeletion
public void markForDeletion(File toDelete)
createTempDir
public File createTempDir()
createTempFile
public File createTempFile()
throws IOException
- Throws:
IOException
cleanUp
public void cleanUp()
throws IOException
- Throws:
IOException
assertFileExistence
public void assertFileExistence(File dir,
String filename,
boolean shouldExist)
assertFileContents
public void assertFileContents(File dir,
String filename,
String contentsTest,
String encoding)
throws IOException
- Throws:
IOException
createFile
public File createFile(File dir,
String filename,
String contents,
String encoding)
throws IOException
- Throws:
IOException
getFileContents
public String getFileContents(File file,
String encoding)
throws IOException
- Throws:
IOException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
createFile
public File createFile(String filename,
String content,
String encoding)
throws IOException
- Throws:
IOException
Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.