|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsrc2xml.FileUtils
public class FileUtils
This class collects some File facilities
Nested Class Summary | |
---|---|
static class |
FileUtils.RegexFilenameFilter
A class that implements a regexp file filter |
Constructor Summary | |
---|---|
FileUtils()
|
Method Summary | |
---|---|
static java.io.File |
EnsureFile(java.lang.String fname)
Return a file with the given filename creating the necessary directories if not present |
static java.lang.String |
ExtractExt(java.lang.String fname)
Extract file extension |
static java.util.ArrayList<java.io.File> |
FileList(java.io.File f,
java.io.FilenameFilter filt,
boolean recurse)
Recursively walk a directory tree and return a List of all Files found matching a filter (no directories) |
static java.lang.String |
JoinPaths(java.lang.String base,
java.lang.String path)
Join two paths |
static java.lang.String |
RelativizePath(java.lang.String base,
java.lang.String path)
Relativize path |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtils()
Method Detail |
---|
public static java.lang.String ExtractExt(java.lang.String fname)
fname
- The input file path
String
public static java.lang.String RelativizePath(java.lang.String base, java.lang.String path)
base
- The input base pathpath
- The path to relativize
String
public static java.lang.String JoinPaths(java.lang.String base, java.lang.String path)
base
- The input base pathpath
- The tail path
String
public static java.io.File EnsureFile(java.lang.String fname) throws java.io.IOException
filename
- The file to create
java.io.IOException
public static java.util.ArrayList<java.io.File> FileList(java.io.File f, java.io.FilenameFilter filt, boolean recurse)
aStartingDir
- a valid directory, which can be read
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |