put_cstring(jni, path, pathstr);
}
+JNIEXPORT void JNIFUNC(chmod)(JNIEnv *jni, jobject cls,
+ jobject path, jint mode)
+{
+ const char *pathstr = 0;
+
+ pathstr = get_cstring(jni, path); if (!pathstr) goto end;
+ if (chmod(pathstr, mode)) {
+ except_syserror(jni, SYSERR, errno,
+ "failed st permissions on `%s'", pathstr);
+ goto end;
+ }
+end:
+ put_cstring(jni, path, pathstr);
+}
+
JNIEXPORT void JNIFUNC(mkfile)(JNIEnv *jni, jobject cls,
jobject path, jint mode)
{