public interface IFileCleaner
Needed to remove files created temporarily for the needs of FileUpload functionality.
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Call this method to stop the cleaner and to free all allocated resources by it
|
void |
track(File file,
Object marker)
Track the specified file, using the provided marker, deleting the file when the marker
instance is garbage collected.
|
void |
track(File file,
Object marker,
org.apache.commons.io.FileDeleteStrategy deleteStrategy)
Track the specified file, using the provided marker, deleting the file when the marker
instance is garbage collected.
|
void track(File file, Object marker)
file - the file to be tracked, not nullmarker - the marker object used to track the file, not nullNullPointerException - if the file is nullvoid track(File file, Object marker, org.apache.commons.io.FileDeleteStrategy deleteStrategy)
file - the file to be tracked, not nullmarker - the marker object used to track the file, not nulldeleteStrategy - the strategy that actually deletes the file. E.g. to delete a non-empty folder the
strategy should delete all children firstNullPointerException - if the file is nullvoid destroy()
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.