|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--mark.core.files.Util
Util is a class that contains a number of simple static utility methods.
| Constructor Summary | |
Util()
|
|
| Method Summary | |
static void |
addFile(java.lang.String file,
java.io.FileFilter ff,
boolean recursive,
boolean includeInvisible,
boolean includeDirs,
boolean includeFiles,
java.util.Collection to)
Given a filename and a collection, performs a number of tests on the file, and if the file passes all of the tests, adds a java.io.File java.io.File object corresponding to the filename to the collection. |
static void |
addFiles(java.util.Collection from,
java.io.FileFilter ff,
boolean recursive,
boolean includeInvisible,
boolean includeDirs,
boolean includeFiles,
java.util.Collection to)
Calls addFile on each filename in the given collection. |
static void |
addFiles(java.lang.String[] from,
java.io.FileFilter ff,
boolean recursive,
boolean includeInvisible,
boolean includeDirs,
boolean includeFiles,
java.util.Collection to)
Calls addFile on each filename in the given array. |
static void |
process(java.util.Collection c,
FileProcessor fp,
boolean display)
Process each file in the given collection with the given FileProcessor. |
static void |
toFile(java.lang.String s,
java.lang.String f)
Outputs the given sting to a file with the given name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Util()
| Method Detail |
public static void toFile(java.lang.String s,
java.lang.String f)
throws java.lang.Exception
s - the string.f - the name of the file.
java.lang.Exception
public static void addFile(java.lang.String file,
java.io.FileFilter ff,
boolean recursive,
boolean includeInvisible,
boolean includeDirs,
boolean includeFiles,
java.util.Collection to)
throws java.lang.Exception
file - the filename.ff - if ff is not null, then ff must accept the file.recursive - whether to add recursively if the file passes and is a
directory.includeInvisible - if includVisible is false, then the file must be
visible.includeDirs - if includeDirs is false, then the file must not
be a directory.includeFiles - if includeFiles is false, then the file must not
be a regular file.to - the collection.
java.lang.Exception
public static void addFiles(java.util.Collection from,
java.io.FileFilter ff,
boolean recursive,
boolean includeInvisible,
boolean includeDirs,
boolean includeFiles,
java.util.Collection to)
throws java.lang.Exception
from - the given collection.ff - if ff is not null, then ff must accept the file.recursive - whether to add recursively if the file passes and is a
directory.includeInvisible - if includVisible is false, then the file must be
visible.includeDirs - if the includeDirs is false, then the file must not
be a directory.includeFiles - if includeFiles is false, then the file must not
be a regular file.to - the collection to place the File objects.
java.lang.Exception
public static void addFiles(java.lang.String[] from,
java.io.FileFilter ff,
boolean recursive,
boolean includeInvisible,
boolean includeDirs,
boolean includeFiles,
java.util.Collection to)
throws java.lang.Exception
from - the given array.ff - if ff is not null, then ff must accept the file.recursive - whether to add recursively if the file passes and is a
directory.includeInvisible - if includVisible is false, then the file must be
visible.includeDirs - if the includeDirs is false, then the file must not
be a directory.includeFiles - if includeFiles is false, then the file must not
be a regular file.to - the collection to place the File objects.
java.lang.Exception
public static void process(java.util.Collection c,
FileProcessor fp,
boolean display)
throws java.lang.Exception
c - the Collection.fp - the FileProcessor.display - Whether to display status messages to standard error.
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||