Home | History | Annotate | Download | only in jni

Lines Matching full:path

36 static int readFromFile(const char *path, char* buf, size_t size, bool throwError)
38 if (!path)
41 int fd = open(path, O_RDONLY, 0);
44 ALOGE("Could not open '%s'", path);
62 static int writeToFile(const char *path, int val)
68 if (!path)
71 fd = open(path, O_WRONLY, 0);
73 ALOGE("writeToFile: Could not open '%s' err: %d", path, errno);
131 const char *path = NULL;
134 path = jPath ? env->GetStringUTFChars(jPath, NULL) : NULL;
135 if (!path) {
139 int fd = open(path, O_RDONLY, 0);
146 env->ReleaseStringUTFChars(jPath, path);
217 const char *path = NULL;
219 path = jPath ? env->GetStringUTFChars(jPath, NULL) : NULL;
220 if (!path) {
221 jniThrowNullPointerException(env, "path");
225 ret = writeToFile(path, jVal);
226 env->ReleaseStringUTFChars(jPath, path);
232 const char *path = NULL;
236 path = jPath ? env->GetStringUTFChars(jPath, NULL) : NULL;
237 if (!path) {
238 jniThrowNullPointerException(env, "path");
242 if (readFromFile(path, buf, SIZE, true) > 0) {
243 env->ReleaseStringUTFChars(jPath, path);
246 env->ReleaseStringUTFChars(jPath, path);
253 const char *path = NULL;
262 path = jPath ? env->GetStringUTFChars(jPath, NULL) : NULL;
263 if (!path) {
264 jniThrowNullPointerException(env, "path");
268 ret = readFromFile(path, buf, SIZE, true);
269 env->ReleaseStringUTFChars(jPath, path);