public class PathFinder
extends java.lang.Object
Red (tfeng) |
Red (tfeng) |
Modifier and Type | Class and Description |
---|---|
static class |
PathFinder.DirectoryFilter
Filter out all the files in a directory, except for sub-directories.
|
static class |
PathFinder.PostfixFilter
Filter out all the files in a directory, except for those ending with
the given postfix.
|
Constructor and Description |
---|
PathFinder() |
Modifier and Type | Method and Description |
---|---|
static java.io.File[] |
getJavaFiles(java.lang.String path,
boolean subdirs)
Get all the Java source files in a path.
|
static java.lang.String[] |
getPtClassPaths()
Return the class paths containing the root of the Ptolemy tree,
and the Jar files in sub-directories lib/,
vendors/sun/commapi/ and vendors/sun/jxta.
|
static java.lang.String |
getPtolemyPath()
Get the Ptolemy path.
|
static void |
setPtolemyPath(java.lang.String path)
Set the Ptolemy path.
|
public static java.io.File[] getJavaFiles(java.lang.String path, boolean subdirs)
path
- The path to be searched.subdirs
- If true, sub-directories of the path are
also searched.public static java.lang.String[] getPtClassPaths()
public static java.lang.String getPtolemyPath()
setPtolemyPath(String)
, that path is returned. If it is not set,
ptolemy.ptII.dir system property is used (see StringUtilities.getProperty(String)
). If the property does not exist,
simply "./" is returned, assuming that the current path contains a
working version of Ptolemy (may not be correct).setPtolemyPath(String)
public static void setPtolemyPath(java.lang.String path)
path
- The Ptolemy path.getPtolemyPath()