| 139 | } |
| 140 | |
| 141 | inline int doOpen(JNIEnv* e, string_t path, int mask) |
| 142 | { |
| 143 | int fd = OPEN(path, mask | OPEN_MASK, S_IRUSR | S_IWUSR); |
| 144 | if (fd == -1) { |
| 145 | if (errno == ENOENT) { |
| 146 | throwNewErrno(e, "java/io/FileNotFoundException"); |
| 147 | } else { |
| 148 | throwNewErrno(e, "java/io/IOException"); |
| 149 | } |
| 150 | } |
| 151 | return fd; |
| 152 | } |
| 153 | |
| 154 | inline void doClose(JNIEnv* e, jint fd) |
| 155 | { |
no test coverage detected