frysk.testbed
Class TearDownFile
java.lang.Object
java.io.File
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
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 |
TearDownFile
public TearDownFile(String name)
- Construct a TearDownFile object with the specified name.
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.