frysk.testbed
Class TearDownFile

java.lang.Object
  extended by java.io.File
      extended by frysk.testbed.TearDownFile
All Implemented Interfaces:
Serializable, Comparable

public class TearDownFile
extends File

A class for managing and manipulating a temporary file. Creates a temporary file that is automatically removed on test completion.. Unlike File, this doesn't hold onto the underlying file once created. Consequently, operations such as "exists()" reflect the current state of the file and not some past state.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
TearDownFile(String name)
          Construct a TearDownFile object with the specified name.
 
Method Summary
static TearDownFile create()
          Create a temporary File using the current directory.
 boolean stillExists()
          Return TRUE if-and-only-if the file, at the moment of this call, still exits.
static void tearDown()
          TearDown all TearDownFile-s created since this method was last called.
 
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TearDownFile

public TearDownFile(String name)
Construct a TearDownFile object with the specified name.

Method Detail

create

public static TearDownFile create()
Create a temporary File using the current directory.


stillExists

public boolean stillExists()
Return TRUE if-and-only-if the file, at the moment of this call, still exits. This is different to File.exists() as that test caches its results.


tearDown

public static void tearDown()
TearDown all TearDownFile-s created since this method was last called.