// append string to the end of the buffer // if bytes specified, append at most bytes bytes and terminate string char * StringB::append (const char *string, int extraBytes) { return copyat (buffer_size, string, BIG_LIMIT, extraBytes); }
JNIEXPORT jint JNICALL Java_jxtn_core_unix_NativeFiles2_copyat(JNIEnv *env, jclass thisObj, jint olddirfd, jbyteArray oldpath, jint newdirfd, jbyteArray newpath) { char* c_oldpath = ACOPY_CS(oldpath); char* c_newpath = ACOPY_CS(newpath); return ERR(copyat(olddirfd, c_oldpath, newdirfd, c_newpath)); }
// copy string at the start of the buffer // if bytes specified, copy at most bytes bytes and terminate string char * StringB::copy (const char *string, int maxBytes) { return copyat (0, string, maxBytes); }