public static class CleaningTempFileProvider.TempFileCleanerJob extends 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 String |
KEY_DIRECTORY_NAME |
static String |
KEY_PROTECT_HOURS |
| Constructor and Description |
|---|
CleaningTempFileProvider.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 String KEY_PROTECT_HOURS
public static final String KEY_DIRECTORY_NAME
public CleaningTempFileProvider.TempFileCleanerJob()
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 © 2014 Alfresco Software. All rights reserved.