|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.meshcms.util.DirectoryParser
org.meshcms.core.DirectoryCleaner
Deletes old files from a directory.
Field Summary |
Fields inherited from class org.meshcms.util.DirectoryParser |
initialDir, processStartDir, recursive |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
DirectoryCleaner(java.io.File directory)
Creates a directory cleaner for the given web application to remove empty directories. |
|
DirectoryCleaner(java.io.File directory,
long maxLifeMillis)
Creates a directory cleaner for the given web application to remove old files empty directories. |
Method Summary | |
protected void |
postProcessDirectory(java.io.File file,
Path path)
|
protected boolean |
preProcess()
This method is called during the process, but before any element has been processed. |
protected void |
processFile(java.io.File file,
Path path)
This method will be called for any file found while parsing the base directory. |
Methods inherited from class org.meshcms.util.DirectoryParser |
getInitialDir, isProcessStartDir, isRecursive, isSorted, postProcess, preProcessDirectory, process, run, setInitialDir, setInitialDir, setProcessStartDir, setRecursive, setSorted |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DirectoryCleaner(java.io.File directory)
public DirectoryCleaner(java.io.File directory, long maxLifeMillis)
maxLifeMillis
- maximum file age in millisecondsMethod Detail |
protected boolean preProcess()
DirectoryParser
The base implementation does nothing and returns true.
preProcess
in class DirectoryParser
protected void postProcessDirectory(java.io.File file, Path path)
postProcessDirectory
in class DirectoryParser
protected void processFile(java.io.File file, Path path)
DirectoryParser
processFile
in class DirectoryParser
file
- the file to be processedpath
- the path of the file (relative to the base directory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |