public class MacStuff
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
fileHasType(java.io.File file,
java.lang.String type)
Returns true if a file has the given file type.
|
static boolean |
isMacintosh()
Determines if we're running on a Macintosh,
so appropriate UI adjustments can be made.
|
public static boolean isMacintosh()
public static boolean fileHasType(java.io.File file, java.lang.String type) throws java.lang.ClassNotFoundException
try {
if (sig.getType() == SignatureType.FILETYPE &&
MacStuff.isMacintosh ()) {
if (!MacStuff.fileHasType(file, sig.getValueString())) {
info.setConsistent (false);
}
}
}
catch (ClassNotFoundException e) {
// Mac classes missing -- can't check filetype.
}
java.lang.ClassNotFoundException