|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.common.commands.FileCommands
public class FileCommands
This class contains utilities for managing file used in logs.
| Constructor Summary | |
|---|---|
FileCommands()
|
|
| Method Summary | |
|---|---|
static void |
deleteFiles(java.io.File[] files,
boolean wait)
Delete a list of one or more files in array order. |
static java.io.File[] |
filesOverModDate(java.io.File[] files,
Interval retention)
Returns members of a file array whose last modification dates are older than a specific retention period. |
static java.io.File[] |
filesOverRetention(java.io.File dir,
java.lang.String prefix,
int retention)
Compute and return a list of files matching a particular prefixed that exceed the number of files to retain. |
static java.io.File[] |
filesOverRetentionAndInactive(java.io.File dir,
java.lang.String prefix,
int retention,
java.lang.String activeFile)
Returns only those files that are over retention and whose names sort lexically below an active file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileCommands()
| Method Detail |
|---|
public static void deleteFiles(java.io.File[] files,
boolean wait)
files - Files to be deletedwait - If true, execute synchronously
public static java.io.File[] filesOverRetention(java.io.File dir,
java.lang.String prefix,
int retention)
dir - Directory in which to see filesprefix - File prefix against which to matchretention - Number of files to retain.
public static java.io.File[] filesOverRetentionAndInactive(java.io.File dir,
java.lang.String prefix,
int retention,
java.lang.String activeFile)
dir - Directory in which to see filesprefix - File prefix against which to matchretention - Number of files to retain.activeFile - Currently active file; this and higher files should not
be deleted. Ignored if null.
public static java.io.File[] filesOverModDate(java.io.File[] files,
Interval retention)
files - List of files to evaluateretention - Retention period
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||