StudyingUnixInterface/4/fileDirectory/rename.c
2020-12-07 12:17:01 +08:00

11 lines
188 B
C

#include <fcntl.h>
#include <stdio.h>
int main(void) {
if(renameat(AT_FDCWD, "test/test2", AT_FDCWD, "test/test3") < 0) {
printf("rename error\n");
return -1;
}
return 0;
}