|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.file.FileCleaner
public class FileCleaner
Default implementation of IFileCleaner
that uses Apache commons-io
FileCleaningTracker
to track and clean the temporary created files.
Note: this implementation starts a daemon thread to do the actual work, so it may not be used in some environments like Google AppEngine.
Constructor Summary | |
---|---|
FileCleaner()
Construct. |
Method Summary | |
---|---|
void |
destroy()
Call this method to stop the cleaner and to free all allocated resources by it |
void |
track(java.io.File file,
java.lang.Object marker)
Track the specified file, using the provided marker, deleting the file when the marker instance is garbage collected. |
void |
track(java.io.File file,
java.lang.Object marker,
FileDeleteStrategy deleteStrategy)
Track the specified file, using the provided marker, deleting the file when the marker instance is garbage collected. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileCleaner()
Method Detail |
---|
public void track(java.io.File file, java.lang.Object marker)
IFileCleaner
track
in interface IFileCleaner
file
- the file to be tracked, not nullmarker
- the marker object used to track the file, not nullpublic void track(java.io.File file, java.lang.Object marker, FileDeleteStrategy deleteStrategy)
IFileCleaner
track
in interface IFileCleaner
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 firstpublic void destroy()
IFileCleaner
destroy
in interface IFileCleaner
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |