unix文件和目录操作的函数stat()、fstat()、lstat()、access()、umask()函数
(1)stat()函数:通过文件名filename来获取文件的属性值表头文件:#include#include定义函数:intstat(constchar*file_name,structstat*buf);函数说明:通过文件名filename获取文件信息,并保存在buf所指的结构体stat中返回值:执行成功则返回0,失败返回-1,错误代码存于errno结构体stat相关的内容:structsta