org.apache.maven.shared.tools.easymock
Class TestFileManager
java.lang.Object
org.apache.maven.shared.tools.easymock.TestFileManager
public class TestFileManager
- extends java.lang.Object
Constructor Summary |
TestFileManager(java.lang.String baseFilename,
java.lang.String fileSuffix)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEMP_DIR_PATH
public static final java.lang.String TEMP_DIR_PATH
filesToDelete
private java.util.List filesToDelete
baseFilename
private final java.lang.String baseFilename
fileSuffix
private final java.lang.String fileSuffix
callerInfo
private java.lang.StackTraceElement callerInfo
cleanupWarning
private java.lang.Thread cleanupWarning
warnAboutCleanup
private boolean warnAboutCleanup
TestFileManager
public TestFileManager(java.lang.String baseFilename,
java.lang.String fileSuffix)
initializeCleanupMonitoring
private void initializeCleanupMonitoring()
maybeWarnAboutCleanUp
private void maybeWarnAboutCleanUp()
markForDeletion
public void markForDeletion(java.io.File toDelete)
createTempDir
public java.io.File createTempDir()
createTempFile
public java.io.File createTempFile()
throws java.io.IOException
- Throws:
java.io.IOException
cleanUp
public void cleanUp()
throws java.io.IOException
- Throws:
java.io.IOException
assertFileExistence
public void assertFileExistence(java.io.File dir,
java.lang.String filename,
boolean shouldExist)
assertFileContents
public void assertFileContents(java.io.File dir,
java.lang.String filename,
java.lang.String contentsTest)
throws java.io.IOException
- Throws:
java.io.IOException
createFile
public java.io.File createFile(java.io.File dir,
java.lang.String filename,
java.lang.String contents)
throws java.io.IOException
- Throws:
java.io.IOException
getFileContents
public java.lang.String getFileContents(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable
createFile
public java.io.File createFile(java.lang.String filename,
java.lang.String content)
throws java.io.IOException
- Throws:
java.io.IOException