mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
quick sketches of various SWT 3.3 dependencies
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
# define STRUCT_STAT struct _stat
|
||||
# define MKDIR(path, mode) _mkdir(path)
|
||||
# define CREAT _creat
|
||||
# define UNLINK _unlink
|
||||
# define OPEN_MASK O_BINARY
|
||||
#else
|
||||
# include <unistd.h>
|
||||
@ -32,6 +33,7 @@
|
||||
# define STRUCT_STAT struct stat
|
||||
# define MKDIR mkdir
|
||||
# define CREAT creat
|
||||
# define UNLINK unlink
|
||||
# define OPEN_MASK 0
|
||||
#endif
|
||||
|
||||
@ -150,6 +152,18 @@ Java_java_io_File_createNewFile(JNIEnv* e, jclass, jstring path)
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_java_io_File_delete(JNIEnv* e, jclass, jstring path)
|
||||
{
|
||||
const char* chars = e->GetStringUTFChars(path, 0);
|
||||
int r = -1;
|
||||
if (chars) {
|
||||
r = UNLINK(chars);
|
||||
e->ReleaseStringUTFChars(path, chars);
|
||||
}
|
||||
return r == 0;
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_java_io_File_exists(JNIEnv* e, jclass, jstring path)
|
||||
{
|
||||
|
Reference in New Issue
Block a user