char buf[40]; sprintf(buf, "D%04o 0 ", modes); back->send(buf, strlen(buf)); back->send(name, strlen(name)); back->send("\n", 1); return response();
if (using_sftp) { char *fullname; char const *err; struct fxp_attrs attrs; if (scp_sftp_targetisdir) { fullname = dupcat(scp_sftp_remotepath, "/", name, NULL); } else { fullname = dupstr(scp_sftp_remotepath); }   if (!fxp_mkdir(fullname)) err = fxp_error(); else err = "server reported no error"; if (!fxp_stat(fullname, &attrs) || !(attrs.flags & SSH_FILEXFER_ATTR_PERMISSIONS) || !(attrs.permissions & 0040000)) { tell_user(stderr, "unable to create directory %s: %s", fullname, err); errs++; return 1; }  scp_sftp_remotepath = fullname;  return 0; } else { char buf[40]; sprintf(buf, "D%04o 0 ", modes); back->send(buf, strlen(buf)); back->send(name, strlen(name)); back->send("\n", 1); return response(); }
int scp_send_dirname(char *name, int modes){    char buf[40];    sprintf(buf, "D%04o 0 ", modes);    back->send(buf, strlen(buf));    back->send(name, strlen(name));    back->send("\n", 1);    return response();}