| 532 | } |
| 533 | |
| 534 | extern "C" JNIEXPORT jboolean JNICALL |
| 535 | Java_java_io_File_isFile(JNIEnv* e, jclass, jstring path) |
| 536 | { |
| 537 | string_t chars = getChars(e, path); |
| 538 | if (chars) { |
| 539 | STRUCT_STAT s; |
| 540 | int r = STAT(chars, &s); |
| 541 | bool v = (r == 0 and S_ISREG(s.st_mode)); |
| 542 | releaseChars(e, path, chars); |
| 543 | return v; |
| 544 | } else { |
| 545 | return false; |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | extern "C" JNIEXPORT jboolean JNICALL |
| 550 | Java_java_io_File_exists(JNIEnv* e, jclass, jstring path) |
nothing calls this directly
no test coverage detected