2014年6月10日
摘要: 可以使用access函数来判断文件或文件夹是否存在。1 int access(const char *filename, int mode);access函数,当对文件使用时,判断是否存在指定的文件,以及是否能够按指定的模式进行访问。当对目录使用时,只判断是否存在指定的目录参数mode可为以下的其中... 阅读全文
posted @ 2014-06-10 16:35 江左醉风流 阅读(1231) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2014-06-10 16:22 江左醉风流 阅读(3149) 评论(0) 推荐(1) 编辑