public static class TempFileProvider.TempFileCleanerJob
extends java.lang.Object
implements org.quartz.Job
The job data must include a property protectHours, which is the number of hours to protect a temporary file from deletion since its last modification.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY_PROTECT_HOURS |
| Constructor and Description |
|---|
TempFileProvider.TempFileCleanerJob() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(org.quartz.JobExecutionContext context)
Gets a list of all files in the
temp directory
and deletes all those that are older than the given number of hours. |
static int |
removeFiles(long removeBefore)
Removes all temporary files created before the given time.
|
public static final java.lang.String KEY_PROTECT_HOURS
public void execute(org.quartz.JobExecutionContext context)
throws org.quartz.JobExecutionException
temp directory
and deletes all those that are older than the given number of hours.execute in interface org.quartz.Joborg.quartz.JobExecutionExceptionpublic static int removeFiles(long removeBefore)
The delete will cascade down through directories as well.
removeBefore - only remove files created before this timeCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.