natFileWin32.cc (_access): Renamed.
* java/io/natFileWin32.cc (_access): Renamed. (_stat): Likewise. * java/io/natFile.cc (_access): Renamed. (_stat): Likewise. * java/io/File.java (access, stat): Add leading `_' to name. Updated all callers. From-SVN: r44124
This commit is contained in:
parent
fed3b7b431
commit
e5c83273cf
4 changed files with 24 additions and 12 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2001-07-18 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* java/io/natFileWin32.cc (_access): Renamed.
|
||||||
|
(_stat): Likewise.
|
||||||
|
* java/io/natFile.cc (_access): Renamed.
|
||||||
|
(_stat): Likewise.
|
||||||
|
* java/io/File.java (access, stat): Add leading `_' to name.
|
||||||
|
Updated all callers.
|
||||||
|
|
||||||
2001-07-18 Tom Tromey <tromey@redhat.com>
|
2001-07-18 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
For PR java/2812:
|
For PR java/2812:
|
||||||
|
|
|
@ -29,13 +29,13 @@ public class File implements Serializable, Comparable
|
||||||
public boolean canRead ()
|
public boolean canRead ()
|
||||||
{
|
{
|
||||||
checkRead();
|
checkRead();
|
||||||
return access (READ);
|
return _access (READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canWrite ()
|
public boolean canWrite ()
|
||||||
{
|
{
|
||||||
checkWrite();
|
checkWrite();
|
||||||
return access (WRITE);
|
return _access (WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native boolean performCreate() throws IOException;
|
private native boolean performCreate() throws IOException;
|
||||||
|
@ -71,7 +71,7 @@ public class File implements Serializable, Comparable
|
||||||
public boolean exists ()
|
public boolean exists ()
|
||||||
{
|
{
|
||||||
checkRead();
|
checkRead();
|
||||||
return access (EXISTS);
|
return _access (EXISTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public File (String p)
|
public File (String p)
|
||||||
|
@ -209,20 +209,20 @@ public class File implements Serializable, Comparable
|
||||||
public boolean isDirectory ()
|
public boolean isDirectory ()
|
||||||
{
|
{
|
||||||
checkRead();
|
checkRead();
|
||||||
return stat (DIRECTORY);
|
return _stat (DIRECTORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFile ()
|
public boolean isFile ()
|
||||||
{
|
{
|
||||||
checkRead();
|
checkRead();
|
||||||
return stat (ISFILE);
|
return _stat (ISFILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 1.2 */
|
/** @since 1.2 */
|
||||||
public boolean isHidden()
|
public boolean isHidden()
|
||||||
{
|
{
|
||||||
checkRead();
|
checkRead();
|
||||||
return stat (ISHIDDEN);
|
return _stat (ISHIDDEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long lastModified ()
|
public long lastModified ()
|
||||||
|
@ -566,8 +566,11 @@ public class File implements Serializable, Comparable
|
||||||
private final static int LENGTH = 1;
|
private final static int LENGTH = 1;
|
||||||
|
|
||||||
private final native long attr (int query);
|
private final native long attr (int query);
|
||||||
private final native boolean access (int query);
|
// On OSF1 V5.0, `stat' is a macro. It is easiest to use the name
|
||||||
private final native boolean stat (int query);
|
// `_stat' instead. We do the same thing for `_access' just in
|
||||||
|
// case.
|
||||||
|
private final native boolean _access (int query);
|
||||||
|
private final native boolean _stat (int query);
|
||||||
|
|
||||||
private static final long serialVersionUID = 301077366599181567L;
|
private static final long serialVersionUID = 301077366599181567L;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ details. */
|
||||||
#include <java/lang/System.h>
|
#include <java/lang/System.h>
|
||||||
|
|
||||||
jboolean
|
jboolean
|
||||||
java::io::File::access (jint query)
|
java::io::File::_access (jint query)
|
||||||
{
|
{
|
||||||
char buf[MAXPATHLEN];
|
char buf[MAXPATHLEN];
|
||||||
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
||||||
|
@ -59,7 +59,7 @@ java::io::File::access (jint query)
|
||||||
}
|
}
|
||||||
|
|
||||||
jboolean
|
jboolean
|
||||||
java::io::File::stat (jint query)
|
java::io::File::_stat (jint query)
|
||||||
{
|
{
|
||||||
char buf[MAXPATHLEN];
|
char buf[MAXPATHLEN];
|
||||||
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
||||||
|
|
|
@ -25,7 +25,7 @@ details. */
|
||||||
#include <java/lang/System.h>
|
#include <java/lang/System.h>
|
||||||
|
|
||||||
jboolean
|
jboolean
|
||||||
java::io::File::access (jint query)
|
java::io::File::_access (jint query)
|
||||||
{
|
{
|
||||||
char buf[MAX_PATH];
|
char buf[MAX_PATH];
|
||||||
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
||||||
|
@ -46,7 +46,7 @@ java::io::File::access (jint query)
|
||||||
}
|
}
|
||||||
|
|
||||||
jboolean
|
jboolean
|
||||||
java::io::File::stat (jint query)
|
java::io::File::_stat (jint query)
|
||||||
{
|
{
|
||||||
char buf[MAX_PATH];
|
char buf[MAX_PATH];
|
||||||
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue