C语言中stat函数的使用

  函数原型 int stat(const char * file_name,struct stat *buf); 表头文件: #include<unistd.h> #include<sys/stat.h> stat()用来将参数file_name所指的文件状态, 复制到参数buf所指的结构中。 const char*表示文件的路径,struct stat*buf 表示声明的结构体 stat,ls
相关文章
相关标签/搜索