org.apache.commons.io

## Class FileCleaningTracker.Tracker

- java.lang.Object
- - java.lang.ref.Reference<T>
  - - java.lang.ref.PhantomReference<Object>
    - - org.apache.commons.io.FileCleaningTracker.Tracker

- Enclosing class:
    FileCleaningTracker

      public static final class FileCleaningTracker.Tracker
      extends PhantomReference<Object>

  Inner class which acts as the reference for a file pending deletion.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Tracker(String path, FileDeleteStrategy deleteStrategy, Object marker, ReferenceQueue<? super Object> queue)` Constructs an instance of this class from the supplied parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `delete()` Deletes the file associated with this tracker instance.
    `String` | `getPath()` Gets the path.

    - ### Methods inherited from class java.lang.ref.PhantomReference

      `get`

    - ### Methods inherited from class java.lang.ref.Reference

      `clear, clone, enqueue, isEnqueued`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Tracker

          Tracker(String path,
                  FileDeleteStrategy deleteStrategy,
                  Object marker,
                  ReferenceQueue<? super Object> queue)

      Constructs an instance of this class from the supplied parameters.
      Parameters:
        `path` - the full path to the file to be tracked, not null
        `deleteStrategy` - the strategy to delete the file, null means normal
        `marker` - the marker object used to track the file, not null
        `queue` - the queue on to which the tracker will be pushed, not null

  - ### Method Detail

    - #### delete

          public boolean delete()

      Deletes the file associated with this tracker instance.
      Returns:
        `true` if the file was deleted successfully; `false` otherwise.

    - #### getPath

          public String getPath()

      Gets the path.
      Returns:
        the path