+2006-07-14 Gary Benson <gbenson@redhat.com>
+
+ * java/io/File.java (internalExists): New method.
+ (exists): Use internalExists.
+ (internalIsDirectory): New method.
+ (isDirectory): Use internalIsDirectory.
+ (createTempFile): Use internalExists and internalIsDirectory.
+
2006-07-13 Bryce McKinlay <mckinlay@redhat.com>
* interpret.cc (_Jv_InterpMethod::run): Don't SAVE_PC for fdiv.
return path.equalsIgnoreCase(other.path);
}
+ /*
+ * This method tests whether or not the file represented by the
+ * object actually exists on the filesystem.
+ */
+ private boolean internalExists()
+ {
+ return _access (EXISTS);
+ }
+
/**
* This method tests whether or not the file represented by the object
* actually exists on the filesystem.
public boolean exists()
{
checkRead();
- return _access (EXISTS);
+ return internalExists();
}
/**
*/
public native boolean isAbsolute();
+ /*
+ * This method tests whether or not the file represented by this
+ * object is a directory.
+ */
+ private boolean internalIsDirectory()
+ {
+ return _stat (DIRECTORY);
+ }
+
/**
* This method tests whether or not the file represented by this object
* is a directory. In order for this method to return <code>true</code>,
public boolean isDirectory()
{
checkRead();
- return _stat (DIRECTORY);
+ return internalIsDirectory();
}
/**
throw new IOException("Cannot determine system temporary directory");
directory = new File(dirname);
- if (!directory.exists())
+ if (!directory.internalExists())
throw new IOException("System temporary directory "
+ directory.getName() + " does not exist.");
- if (!directory.isDirectory())
+ if (!directory.internalIsDirectory())
throw new IOException("System temporary directory "
+ directory.getName()
+ " is not really a directory.");