fstat/stat系统调用
来源:互联网 发布:植物生根液是vb还是vc 编辑:程序博客网 时间:2024/06/07 06:25
功能描述:获取文件(普通文件,目录,管道,socket,字符,块)的属性。
用法:
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int stat(const char *restrict pathname, struct stat *restrict buf); 提供文件名字,获取文件对应属性。
int fstat(int filedes, struct stat *buf); 通过文件描述符,获取文件对应的属性。
struct stat {
mode_t st_mode; //文件对应的模式,文件,目录等
ino_t st_ino; //inode节点号
dev_t st_dev; //设备号码
dev_t st_rdev; //特殊设备号码
nlink_t st_nlink; //文件的连接数
uid_t st_uid; //文件所有者
gid_t st_gid; //文件所有者对应的组
off_t st_size; //普通文件,对应的文件字节数
time_t st_atime; //文件最后被访问的时间
time_t st_mtime; //文件内容最后被修改的时间
time_t st_ctime; //文件状态改变时间
blksize_t st_blksize; //文件内容对应的块大小
blkcnt_t st_blocks; //伟建内容对应的块数量
};
- fstat/stat系统调用
- Linux 函数--fstat/stat/lstat系统调用
- Linux 函数--fstat/stat/lstat系统调用
- Linux 函数--fstat/stat/lstat系统调用
- Linux 函数--fstat/stat/lstat系统调用
- 系统调用 stat(), fstat(), lstat() 函数
- Linux系统调用--fstat/stat/lstat函数详解
- Linux系统调用--fstat/stat/lstat函数详解
- Linux系统调用--fstat/stat/lstat函数详解
- 系统调用,stat,fstat以及lstat函数:检查文件的属性
- 与文件管理相关的系统调用 lseek fstat stat lstat
- fstat/stat/lstat
- stat/fstat/lstat函数
- fstat stat lstat
- stat, fstat, lstat 函数
- stat/fstat/lstat 区别
- stat、fstat、lstat函数
- stat和fstat函数
- Process Tracing Using Ptrace
- Oracle面试题汇总--2
- Android application context/activity context与内存泄露
- DataGridView添加行号
- log aaaa
- fstat/stat系统调用
- JBOSS使用介绍
- HDU1014 ( Uniform Generator )
- 模式识别的基本流程
- jquery.validate 扩展
- HDU 题目分类
- ecplisePHP Studio 2008 + WampServer部署PHP项目
- 看看自己是否具有创业者的潜质?
- 【个人日志】201203014 迷糊过后的寻找