org.apache.commons.io
Class FileCleaningTracker.Tracker
PhantomReference
org.apache.commons.io.FileCleaningTracker.Tracker
- FileCleaningTracker
private static final class FileCleaningTracker.Tracker
extends PhantomReference
Inner class which acts as the reference for a file pending deletion.
Tracker(String path, FileDeleteStrategy deleteStrategy, Object marker, ReferenceQueue queue) - Constructs an instance of this class from the supplied parameters.
|
boolean | delete() - Deletes the file associated with this tracker instance.
|
deleteStrategy
private final FileDeleteStrategy deleteStrategy
The strategy for deleting files.
path
private final String path
The full path to the file being tracked.
Tracker
(package private) Tracker(String path,
FileDeleteStrategy deleteStrategy,
Object marker,
ReferenceQueue queue)
Constructs an instance of this class from the supplied parameters.
path
- the full path to the file to be tracked, not nulldeleteStrategy
- the strategy to delete the file, null means normalmarker
- the marker object used to track the file, not nullqueue
- the queue on to which the tracker will be pushed, not null
delete
public boolean delete()
Deletes the file associated with this tracker instance.
true
if the file was deleted successfully;
false
otherwise.
Copyright (c) 2002-2008 Apache Software Foundation