Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.pqt.autorib.util
Class PathSearch  view PathSearch download PathSearch.java

java.lang.Object
  extended byorg.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


Field Summary
private  java.util.Vector paths
           
private  char seperator
           
 
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
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

paths

private java.util.Vector paths

seperator

private char seperator
Constructor Detail

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

Method Detail

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