org.shept.util
public class FileUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
private class |
FileUtils.Filter |
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static SortedMap<Calendar,File> |
fileMapByDate(String path,
String filePattern)
List the file directory as specified by the name filter and path directory
The maps keys contain modification dat for comparison
|
static SortedMap<Calendar,File> |
fileMapByFilenameDate(String path,
String filePattern)
List the file directory as specified by the name filter and path directory
The maps keys contain the parsed date from the filename.
|
static SortedMap<FileNameDate,File> |
fileMapByNameAndDate(String path,
String filePattern)
List the file directory as specified by the name filter and the path directory
The maps keys contain name and modification date for comparison
|
static List<File> |
getDirectory(String dirPath) |
static List<File> |
getDirectory(String dirPath,
String filePattern) |
static String |
getTomcatWebAppPath() |
static Integer |
syncAdd(String sourcePath,
String destPath,
String filePattern)
Compare the source path and the destination path for filenames with the filePattern
e.g.
|
public static SortedMap<FileNameDate,File> fileMapByNameAndDate(String path, String filePattern)
public static SortedMap<Calendar,File> fileMapByDate(String path, String filePattern)
path - filePattern - public static SortedMap<Calendar,File> fileMapByFilenameDate(String path, String filePattern)
path - filePattern - public static Integer syncAdd(String sourcePath, String destPath, String filePattern)
destPath - sourcePath - filePattern - public static List<File> getDirectory(String dirPath, String filePattern)
dirPath - public static String getTomcatWebAppPath()
Copyright © 2014. All Rights Reserved.