SandMark version 2.0


sandmark.util
Class TempDir

java.lang.Object
  |
  +--sandmark.util.TempDir

public class TempDir
extends java.lang.Object

A TempDir object represents a temporary directory in the filesystem.


Constructor Summary
TempDir(java.lang.String prefix)
          Constructs a TempDir object and a corresponding directory in the temporary area specified by the java.io.tmpdir system property.
 
Method Summary
 void delete()
          Removes the directory and its contents.
protected  void finalize()
          Removes the directory and its contents.
 java.io.File getFile()
          Returns the File object representing this directory.
 java.lang.String getPath()
          Returns the path of this directory.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TempDir

public TempDir(java.lang.String prefix)
        throws java.io.IOException
Constructs a TempDir object and a corresponding directory in the temporary area specified by the java.io.tmpdir system property. The directory name is formed by appending random digits to the supplied prefix.

Method Detail

getFile

public java.io.File getFile()
Returns the File object representing this directory.


getPath

public java.lang.String getPath()
Returns the path of this directory.


toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object

finalize

protected void finalize()
                 throws java.lang.Throwable
Removes the directory and its contents.

Overrides:
finalize in class java.lang.Object
java.lang.Throwable

delete

public void delete()
            throws java.io.IOException
Removes the directory and its contents.

java.io.IOException

SandMark version 2.0

Mon Jun 17 12:30:47 MST 2002