c语言高手们请问一下-stat这个怎么用行么?

如题所述

1
函数都是获取文件(普通文件,目录,管道,socket,字符,块()的属性。
函数原型
#include
int
stat(const
char
*restrict
pathname,
struct
stat
*restrict
buf);
提供文件名字,获取文件对应属性。
int
fstat(int
filedes,
struct
stat
*buf);
通过文件描述符获取文件对应的属性
温馨提示:答案为网友推荐,仅供参考
相似回答