koala.dynamicjava.util
Class FileFinder

java.lang.Object
  extended by koala.dynamicjava.util.FileFinder
Direct Known Subclasses:
LibraryFinder

public class FileFinder
extends Object

This class represents an object that manages a set of path where to find files.

Version:
1.0 - 1999/05/18
Author:
Stephane Hillion

Constructor Summary
FileFinder()
          Creates a new file finder
 
Method Summary
 void addPath(String path)
          Adds a search path.
 File findFile(String name)
          Searches and returns a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFinder

public FileFinder()
Creates a new file finder

Method Detail

addPath

public void addPath(String path)
Adds a search path. This path becomes the one with the highest priority.

Parameters:
path - the path to add

findFile

public File findFile(String name)
              throws IOException
Searches and returns a file.

Parameters:
name - the base name of the file to find
Throws:
IOException - if no file was found