org.apache.commons.io
Class FileCleaner.Tracker
PhantomReference
org.apache.commons.io.FileCleaner.Tracker
- FileCleaner
private static class FileCleaner.Tracker
extends PhantomReference
Inner class which acts as the reference for a file pending deletion.
private String | path - The full path to the file being tracked.
|
Tracker(File file, Object marker, ReferenceQueue q) - Constructs an instance of this class from the supplied parameters.
|
Tracker(String path, Object marker, ReferenceQueue q) - Constructs an instance of this class from the supplied parameters.
|
boolean | delete() - Deletes the file associated with this tracker instance.
|
path
private String path
The full path to the file being tracked.
Tracker
public Tracker(File file,
Object marker,
ReferenceQueue q)
Constructs an instance of this class from the supplied parameters.
file
- The file to be tracked.marker
- The marker object used to track the file.q
- The queue on to which the tracker will be pushed.
Tracker
public Tracker(String path,
Object marker,
ReferenceQueue q)
Constructs an instance of this class from the supplied parameters.
path
- The full path to the file to be tracked.marker
- The marker object used to track the file.q
- The queue on to which the tracker will be pushed.
delete
public boolean delete()
Deletes the file associated with this tracker instance.
true
if the file was deleted successfully;
false
otherwise.