mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
implement a few classpath methods required by SWT for Win32
This commit is contained in:
@ -163,6 +163,21 @@ Java_java_io_File_delete(JNIEnv* e, jclass, jstring path)
|
||||
return r == 0;
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_java_io_File_isDirectory(JNIEnv* e, jclass, jstring path)
|
||||
{
|
||||
const char* chars = e->GetStringUTFChars(path, 0);
|
||||
if (chars) {
|
||||
STRUCT_STAT s;
|
||||
int r = STAT(chars, &s);
|
||||
bool v = (r == 0 and S_ISDIR(s.st_mode));
|
||||
e->ReleaseStringUTFChars(path, chars);
|
||||
return v;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_java_io_File_exists(JNIEnv* e, jclass, jstring path)
|
||||
{
|
||||
|
Reference in New Issue
Block a user