equal
deleted
inserted
replaced
273 void |
273 void |
274 fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags) |
274 fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags) |
275 { |
275 { |
276 FD h = winFileHandleOpen(env, path, flags); |
276 FD h = winFileHandleOpen(env, path, flags); |
277 if (h >= 0) { |
277 if (h >= 0) { |
|
278 jobject fdobj; |
|
279 jboolean append; |
278 SET_FD(this, h, fid); |
280 SET_FD(this, h, fid); |
|
281 |
|
282 fdobj = (*env)->GetObjectField(env, this, fid); |
|
283 if (fdobj != NULL) { |
|
284 append = (flags & O_APPEND) == 0 ? JNI_FALSE : JNI_TRUE; |
|
285 (*env)->SetBooleanField(env, fdobj, IO_append_fdID, append); |
|
286 } |
279 } |
287 } |
280 } |
288 } |
281 |
289 |
282 /* These are functions that use a handle fd instead of the |
290 /* These are functions that use a handle fd instead of the |
283 old C style int fd as is used in HPI layer */ |
291 old C style int fd as is used in HPI layer */ |