因为我不能使用路径“/subfolder”,所以我试着把包含修改过的路径的NSString放进去,我的代码是:
NSString *bath =[NSString stringWithFormat:@"%@/path", path];
pid_t pid;
int status;
const char *argv[] = {"mkdir", bath, NULL};
posix_spawn(&pid, "/bin/mkdir", NULL, NULL, (char* const*)argv, NULL);
waitpid(pid, &status, WEXITED);`https://stackoverflow.com/questions/44659018
复制相似问题