摘要:
可以使用access函数来判断文件或文件夹是否存在。1 int access(const char *filename, int mode);access函数,当对文件使用时,判断是否存在指定的文件,以及是否能够按指定的模式进行访问。当对目录使用时,只判断是否存在指定的目录参数mode可为以下的其中... 阅读全文
摘要:
1 #include 2 #include 3 #include 4 5 #define EMPTY 1005 6 #define NON_EMPTY 1006 7 8 int check_dir(const char *path) 9 {10... 阅读全文