struct stat {
mode_t st_mode; //(文件保护模式)文件类型和权限信息 结构体详解请参考此处
ino_t st_ino; //文件结点号
dev_t st_dev; //文件所在设备的文件系统标识号 device number (file system)
dev_t st_rdev; //文件所表示的特殊设备文件的设备标识 device number for special files
short st_nlink; //符号链接数
short st_uid; //文件用户标识 用户ID
short st_gid; //文件用户组标识 组ID
off_t st_size; // 总大小,字节为单位 size in bytes,for regular files
time_t st_st_atime; //文件内容最后访问的时间
time_t st_mtime; //文件内容最后修改时间
time_t st_ctime; //文件结构最后状态改变时间
};
2.png
常量 | 描述 |
---|---|
SEEK_SET | 文件的开头 |
SEEK_CUR | 文件指针的当前位置 |
SEEK_END | 文件的末尾 |
作者:简书 链接:http://www.jianshu.com/p/q81RER 來源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
3.png