当前位置:Gxlcms > 数据库问题 > 【转载】 C中的access函数

【转载】 C中的access函数

时间:2021-07-01 10:21:17 帮助过:2人阅读

#include <stdio.h> 2   #include <io.h> 3   int file_exists(char *filename); 4   int main(void) 5   { 6   printf("Does NOTEXIST.FIL exist: %s\n", 7   file_exists("NOTEXISTS.FIL") ? "YES" : "NO"); 8   return 0; 9   } 10   int file_exists(char *filename) 11   { 12   return (access(filename, 0) == 0); 13   }

 

【转载】 C中的access函数

标签:

人气教程排行