- All Implemented Interfaces:
- FarragoAllocation, ClosableAllocation
public class FarragoFileAllocation
- extends Object
- implements FarragoAllocation
FarragoFileAllocation takes care of deleting a File when it is closed. If the
File is a directory, the directory and everything under it is deleted.
Deletion failure is traced as a warning but does not result in an exception.
- $Id: //open/dev/farrago/src/net/sf/farrago/util/FarragoFileAllocation.java#12 $
- John V. Sichi
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
private static final Logger tracer
private File file
public FarragoFileAllocation(File file)
- Creates a new FarragoFileAllocation.
file - the file to be deleted when this allocation is closed
public void closeAllocation()
- Description copied from interface:
- Closes this object.
- Specified by:
closeAllocation in interface
private void deleteFileOrDirectory(File file)
private void deleteDirectory(File dir)