edu.rice.cs.drjava.model
Class JDKDescriptor.Util
java.lang.Object
edu.rice.cs.drjava.model.JDKDescriptor.Util
- Enclosing class:
- JDKDescriptor
public static class JDKDescriptor.Util
- extends Object
Utilities for JDK descriptors.
|
Method Summary |
static boolean |
exists(File jarOrDir,
String... fileNames)
Return true if the file names exist in the specified file, which can either be a directory or jar file. |
static File |
oneOf(File dir,
String... fileNames)
Return the first of the file names that exists in the specified directory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDKDescriptor.Util
public JDKDescriptor.Util()
exists
public static boolean exists(File jarOrDir,
String... fileNames)
- Return true if the file names exist in the specified file, which can either be a directory or jar file.
- Parameters:
jarOrDir - jar file or directoryfileNames - file names that need to exist
- Returns:
- true if all file names are found
oneOf
public static File oneOf(File dir,
String... fileNames)
throws FileNotFoundException
- Return the first of the file names that exists in the specified directory.
Throws FileNotFoundException if none of them exists.
- Parameters:
jarOrDir - jar file or directoryfileNames - file names that need to exist
- Returns:
- file name if found, or null
- Throws:
FileNotFoundException - if none of them exists.