com.softsynth.util
Class FileSearch

java.lang.Object
  extended by com.softsynth.util.FileSearch

public class FileSearch
extends java.lang.Object

Wildcard search for files in directory.

Author:
Phil Burk (C) 1999 SoftSynth.com

Constructor Summary
FileSearch()
           
 
Method Summary
static void createDirectoryIfNeeded(java.io.File dir)
          Create directory with the given name if it doesn't exist.
static void createDirectoryIfNeeded(java.lang.String directoryName)
          Create directory if it doesn't exist.
static void expandFilename(java.lang.String filename, java.util.Vector expandedFilenames)
          Expand filename that may contain wildcards and add to a vector of filenames without wildcards.
static java.util.Vector expandFilenames(java.util.Vector filenames)
          Expand vector of filenames that may contain wildcards into a new vector of filenames without wildcards.
static void main(java.lang.String[] args)
           
static java.lang.String removeExtension(java.lang.String pathName)
          Remove any dot extension from file name.
static java.lang.String removeParent(java.lang.String pathName)
          Extract file name from full pathname.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSearch

public FileSearch()
Method Detail

expandFilenames

public static java.util.Vector expandFilenames(java.util.Vector filenames)
Expand vector of filenames that may contain wildcards into a new vector of filenames without wildcards.


expandFilename

public static void expandFilename(java.lang.String filename,
                                  java.util.Vector expandedFilenames)
Expand filename that may contain wildcards and add to a vector of filenames without wildcards.


removeParent

public static java.lang.String removeParent(java.lang.String pathName)
Extract file name from full pathname. For example, if pathname is "/usr/data/report.txt" then the output will be "report.txt".


removeExtension

public static java.lang.String removeExtension(java.lang.String pathName)
Remove any dot extension from file name. For example, if pathname is "/usr/data/report.txt" then the output will be "/usr/data/report".


main

public static void main(java.lang.String[] args)

createDirectoryIfNeeded

public static void createDirectoryIfNeeded(java.lang.String directoryName)
                                    throws java.lang.SecurityException
Create directory if it doesn't exist.

Throws:
java.lang.SecurityException

createDirectoryIfNeeded

public static void createDirectoryIfNeeded(java.io.File dir)
                                    throws java.lang.SecurityException
Create directory with the given name if it doesn't exist.

Throws:
java.lang.SecurityException