java.lang.Object
org.pqt.autorib.util.PathSearch
- public class PathSearch
- extends java.lang.Object
A class to provide a path searching mechanism. It is sophisticated enough to be
able to use both unix and windows style path separators across both systems.
ie you could specify a path in windows using ':' as a path separator (providing
you specify ':' explicitly in the constructor as a path separator
|
Constructor Summary |
PathSearch(java.lang.String path)
create a PathSearch using the given path and the standard path separator
returned by File.pathSeperator |
PathSearch(java.lang.String path,
char pathSeperator)
create a PathSearch using the given path and path separator character |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
paths
private java.util.Vector paths
seperator
private char seperator
PathSearch
public PathSearch(java.lang.String path,
char pathSeperator)
- create a PathSearch using the given path and path separator character
PathSearch
public PathSearch(java.lang.String path)
- create a PathSearch using the given path and the standard path separator
returned by File.pathSeperator
find
public java.lang.String find(java.lang.String fileName)
- search the path for the given file, returning null if not found, or
the absolute path if found