wt.wrmf.transport
Class TempFileDeletion

java.lang.Object
  extended bywt.wrmf.transport.TempFileDeletion
All Implemented Interfaces:
Serializable

public class TempFileDeletion
extends Object
implements Serializable

This class is designed to be used to delete temporary files or files in temporary directories. The actua deletion will be done by another thread.

Supported API: false

See Also:
Serialized Form

Nested Class Summary
private static class TempFileDeletion.DeleteTempFileThread
           
 
Field Summary
private static TempFileDeletion fileDeletion
           
private static TempFileDeletion.DeleteTempFileThread fileDeletionThread
           
 
Constructor Summary
private TempFileDeletion()
           
 
Method Summary
 void addDirectoryForDeletion(String directoryPath, boolean recursive)
          Add all files in the directory to the list of files to be deleted.
 void addDirectoryForDeletion(String directoryPath, boolean recursive, boolean deleteDirectory)
          Add all files in the directory to the list of files to be deleted.
 void addFileForDeletion(String absoluteFileName)
          Add the file to the list of files to be deleted.
static TempFileDeletion getFileDeletion()
           
private static void startNewThread()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileDeletionThread

private static TempFileDeletion.DeleteTempFileThread fileDeletionThread

fileDeletion

private static TempFileDeletion fileDeletion
Constructor Detail

TempFileDeletion

private TempFileDeletion()
Method Detail

getFileDeletion

public static TempFileDeletion getFileDeletion()

addFileForDeletion

public void addFileForDeletion(String absoluteFileName)
Add the file to the list of files to be deleted.

Supported API: true


addDirectoryForDeletion

public void addDirectoryForDeletion(String directoryPath,
                                    boolean recursive)
Add all files in the directory to the list of files to be deleted.

If "recursive" is set to true, all files in subdirectories will be deleted also. All directories, including its subdirectories, will not be deleted.

Supported API: true


addDirectoryForDeletion

public void addDirectoryForDeletion(String directoryPath,
                                    boolean recursive,
                                    boolean deleteDirectory)
Add all files in the directory to the list of files to be deleted.

If "recursive" is set to true, all files in subdirectories will be deleted also. If "deleteDirectory" is set to true, all applicable directories, including its subdirectories if "recursive" is set to true, will be deleted.

Supported API: true


startNewThread

private static void startNewThread()