com.judoscript.util
Class FileFinder

java.lang.Object
  extended by com.judoscript.util.FileFinder
All Implemented Interfaces:
java.io.FileFilter

public class FileFinder
extends java.lang.Object
implements java.io.FileFilter


Field Summary
static int FST_LOCALFS
           
static int FST_TARFILE
           
static int FST_UNKNOWN
           
static int FST_ZIPFILE
           
static int LIST_DIR_ONLY
           
static int LIST_EVERYTHING
           
static int LIST_FILE_ONLY
           
 
Constructor Summary
protected FileFinder()
           
  FileFinder(java.lang.Object host, java.lang.String base, java.lang.String incls, java.lang.String excls, boolean recursive, boolean noHidden, boolean caseSens, boolean asTree)
           
  FileFinder(java.lang.String base, java.lang.String incls, java.lang.String excls, boolean recursive, boolean noHidden, boolean asTree)
           
  FileFinder(TarFS arch, java.lang.String incls, java.lang.String excls, boolean recursive, boolean noHidden, boolean asTree)
           
  FileFinder(UrlFS urlfs, java.lang.String url)
           
  FileFinder(java.util.zip.ZipFile arch, java.lang.String incls, java.lang.String excls, boolean recursive, boolean noHidden, boolean asTree)
           
 
Method Summary
 boolean accept(java.io.File file)
           
 boolean accept(java.lang.Object file)
           
static void breakSearch()
           
 void close()
           
protected  boolean exists(java.lang.Object file)
           
 java.lang.String getBaseDir()
           
 java.io.File getFile(java.lang.String path)
           
 java.lang.Object getHost()
           
protected  java.lang.String getPath(java.lang.Object file)
           
 java.lang.String getTarFileName()
           
protected  boolean isFolder(java.lang.Object file)
           
protected  boolean isHidden(java.lang.Object file)
           
 boolean isLocal()
           
 boolean isTarFS()
           
 boolean isUrlFS()
           
 boolean isZipFS()
           
 int list(ListReceiver lr, int listOption, int limit)
           
protected  void listChildren(java.lang.Object file, FileFinder filter, java.util.Stack stack)
           
protected  boolean process(java.lang.Object src, int limit)
           
 void setExpandDirs(boolean set)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIST_EVERYTHING

public static final int LIST_EVERYTHING
See Also:
Constant Field Values

LIST_FILE_ONLY

public static final int LIST_FILE_ONLY
See Also:
Constant Field Values

LIST_DIR_ONLY

public static final int LIST_DIR_ONLY
See Also:
Constant Field Values

FST_UNKNOWN

public static final int FST_UNKNOWN
See Also:
Constant Field Values

FST_LOCALFS

public static final int FST_LOCALFS
See Also:
Constant Field Values

FST_ZIPFILE

public static final int FST_ZIPFILE
See Also:
Constant Field Values

FST_TARFILE

public static final int FST_TARFILE
See Also:
Constant Field Values
Constructor Detail

FileFinder

protected FileFinder()

FileFinder

public FileFinder(java.lang.Object host,
                  java.lang.String base,
                  java.lang.String incls,
                  java.lang.String excls,
                  boolean recursive,
                  boolean noHidden,
                  boolean caseSens,
                  boolean asTree)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

FileFinder

public FileFinder(java.lang.String base,
                  java.lang.String incls,
                  java.lang.String excls,
                  boolean recursive,
                  boolean noHidden,
                  boolean asTree)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

FileFinder

public FileFinder(java.util.zip.ZipFile arch,
                  java.lang.String incls,
                  java.lang.String excls,
                  boolean recursive,
                  boolean noHidden,
                  boolean asTree)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

FileFinder

public FileFinder(TarFS arch,
                  java.lang.String incls,
                  java.lang.String excls,
                  boolean recursive,
                  boolean noHidden,
                  boolean asTree)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

FileFinder

public FileFinder(UrlFS urlfs,
                  java.lang.String url)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

close

public void close()

getBaseDir

public java.lang.String getBaseDir()

setExpandDirs

public void setExpandDirs(boolean set)

isLocal

public boolean isLocal()

isZipFS

public boolean isZipFS()

isTarFS

public boolean isTarFS()

isUrlFS

public boolean isUrlFS()

getTarFileName

public java.lang.String getTarFileName()

getHost

public java.lang.Object getHost()

accept

public final boolean accept(java.io.File file)
Specified by:
accept in interface java.io.FileFilter

accept

public final boolean accept(java.lang.Object file)

list

public int list(ListReceiver lr,
                int listOption,
                int limit)
         throws java.lang.Throwable
Throws:
java.lang.Throwable

process

protected boolean process(java.lang.Object src,
                          int limit)
                   throws java.lang.Throwable
Throws:
java.lang.Throwable

isFolder

protected boolean isFolder(java.lang.Object file)

getPath

protected java.lang.String getPath(java.lang.Object file)

exists

protected boolean exists(java.lang.Object file)

isHidden

protected boolean isHidden(java.lang.Object file)

listChildren

protected void listChildren(java.lang.Object file,
                            FileFinder filter,
                            java.util.Stack stack)

getFile

public java.io.File getFile(java.lang.String path)
                     throws java.lang.Exception
Throws:
java.lang.Exception

breakSearch

public static void breakSearch()
                        throws com.judoscript.util.FileFinder.BreakException
Throws:
com.judoscript.util.FileFinder.BreakException