public class FileCollectionFormatter
extends java.lang.Object
| Constructor | Description |
|---|---|
FileCollectionFormatter(java.util.Collection files) |
Creates a new instance from a
Collection of
file names. |
| Modifier and Type | Method | Description |
|---|---|---|
protected static int |
getDepth(java.lang.String directory) |
Returns the depth of the directory
|
java.util.List |
getDirectories() |
Gets a list of
Strings containing the
directories in the file set, ordered by name. |
protected static java.lang.String |
getDirectory(java.lang.String filename) |
Returns directory name of specified file
|
java.util.List |
getFiles(java.lang.String directory) |
Gets the names of all files which reside in a given directory.
|
protected static java.lang.String |
getParent(java.lang.String directory) |
Returns name of parent directory to specified directory
|
protected static java.lang.String |
getRelativeFilename(java.lang.String filename,
java.lang.String dir) |
Returns relative filename for specified file and directory
|
protected static boolean |
isInDirectory(java.lang.String filename,
java.lang.String directory) |
Returns TRUE if file is in specified directroy, FALSE otherwise
|
public FileCollectionFormatter(java.util.Collection files)
Collection of
file names.files - Collection containing the String representations of filespublic java.util.List getDirectories()
Strings containing the
directories in the file set, ordered by name.Strings containing the
directories in the file set, ordered by name.public java.util.List getFiles(java.lang.String directory)
getDirectories()
list. Files will be relative to the directory. They will be
ordered by name.directory - to processgetDirectories()
list. Files will be relative to the directory. They will be
ordered by name.protected static boolean isInDirectory(java.lang.String filename,
java.lang.String directory)
filename - File to testdirectory - Directory to testprotected static java.lang.String getRelativeFilename(java.lang.String filename,
java.lang.String dir)
filename - filedir - directoryprotected static java.lang.String getDirectory(java.lang.String filename)
filename - file to computeprotected static java.lang.String getParent(java.lang.String directory)
directory - to useprotected static int getDepth(java.lang.String directory)
directory - to be analysed