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, 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)
           
 
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,
                               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.