public class IndexSync
extends Object
| Modifier and Type | Field and Description |
|---|---|
private static SimpleDateFormat |
dateFormat |
| Constructor and Description |
|---|
IndexSync() |
| Modifier and Type | Method and Description |
|---|---|
private SubDirFilter |
calcFilter(String indexName,
File srcDir,
File dstDir)
Determine the sub-directory filter for directory scanning.
|
static String |
newestTime(File dir)
Determine the newest file within a directory (or the dir itself if empty) and
return a human-readable version of that time.
|
static String |
oldestTime(File dir)
Determine the oldest file within a directory (or the dir itself if empty) and
return a human-readable version of that time.
|
void |
syncDirs(String indexName,
File srcDir,
File dstDir)
Perform the minimum necessary work to ensure that the contents of dstDir
exactly match srcDir.
|
public void syncDirs(String indexName,
File srcDir,
File dstDir)
throws IOException
indexName - IOException - If anything goes wrong.private SubDirFilter calcFilter(String indexName, File srcDir, File dstDir) throws IOException
IOException - If anything goes wrong.public static String oldestTime(File dir)
public static String newestTime(File dir)