iiitToolkit 1.0

de.iiit.util
Class FileSearch

java.lang.Object
  |
  +--de.iiit.util.FileSearch

public class FileSearch
extends Object

This class searches for a given file name in a set of directories

Version:
$Revision: 1.7 $ $Date: 2003/01/01 21:03:49 $

Constructor Summary
protected FileSearch()
          Creates a new instance of FileSearch
 
Method Summary
static String[] getSearchPath()
          Returns the array of directory names to search in
static String getSearchPathAsString()
          Returns the current set of directories as a String.
static String search(String filename)
          Searches for a given file in a pre-defined set of directories.
static void setSearchPath(String[] path)
          Set the set of directories to search in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSearch

protected FileSearch()
Creates a new instance of FileSearch

Method Detail

setSearchPath

public static void setSearchPath(String[] path)
Set the set of directories to search in.

Parameters:
path - An array of directory names.

getSearchPath

public static String[] getSearchPath()
Returns the array of directory names to search in

Returns:
The array of directory names to search in

getSearchPathAsString

public static String getSearchPathAsString()
Returns the current set of directories as a String. The format of the string depends on the operating system.

Returns:
The current set of directories as a String

search

public static String search(String filename)
Searches for a given file in a pre-defined set of directories.

Parameters:
filename - The name of the file to search for
Returns:
The absolute path of the file of null if the file was not found.

iiitToolkit 1.0

Copyright © 2002, 2003 ingeneurbuero fuer innovative informationstechnik, Dipl.-Ing. Joerg Beckmann, Dortmund, Germany. All Rights Reserved.
See Copyright statement