前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
#include <stdio.h> #include <errno.h> #include <fcntl.h> #include <unistd.h> #include "fs/fs.h" #include "fs/file.h" int remove(const char *path) { int r = unlink(path); if (r==-EISDIR) r = rmdir(path); return r; }