public class FileSearchPath
extends java.lang.Object
Constructor and Description |
---|
FileSearchPath() |
FileSearchPath(java.io.File... dirs) |
Modifier and Type | Method and Description |
---|---|
void |
addDirectory(java.io.File dir) |
void |
addDirectory(int idx,
java.io.File dir) |
java.io.File |
findFile(java.io.File file) |
java.io.File |
findFile(java.lang.String path) |
java.lang.String |
findPath(java.io.File file)
Find the path for a file.
|
java.util.ArrayList<java.io.File> |
getDirectories() |
static java.io.File |
getParentFile(java.io.File file) |
int |
numDirectories() |
void |
setDirectories(java.io.File[] dirs) |
public FileSearchPath()
public FileSearchPath(java.io.File... dirs)
public java.util.ArrayList<java.io.File> getDirectories()
public void setDirectories(java.io.File[] dirs)
public int numDirectories()
public void addDirectory(java.io.File dir)
public static java.io.File getParentFile(java.io.File file)
public void addDirectory(int idx, java.io.File dir)
public java.io.File findFile(java.lang.String path)
public java.io.File findFile(java.io.File file)
public java.lang.String findPath(java.io.File file)
In case the file can be expressed relative to more than one of the search path directories, the shortest relative path is returned.
file
- file to find the path for