org.apache.maven.artifact.testutils
Class TestFileManager

java.lang.Object
  extended by org.apache.maven.artifact.testutils.TestFileManager

public class TestFileManager
extends Object


Field Summary
static String TEMP_DIR_PATH
           
 
Constructor Summary
TestFileManager(String baseFilename, String fileSuffix)
           
 
Method Summary
 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)
           
 File createFile(String filename, String content)
           
 File createTempDir()
           
 File createTempFile()
           
protected  void finalize()
           
 String getFileContents(File file)
           
 void markForDeletion(File toDelete)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMP_DIR_PATH

public static final String TEMP_DIR_PATH
Constructor Detail

TestFileManager

public TestFileManager(String baseFilename,
                       String fileSuffix)
Method Detail

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)
                        throws IOException
Throws:
IOException

createFile

public File createFile(File dir,
                       String filename,
                       String contents)
                throws IOException
Throws:
IOException

getFileContents

public String getFileContents(File file)
                       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)
                throws IOException
Throws:
IOException


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.