本文共 6655 字,大约阅读时间需要 22 分钟。
lstat
函数名: lstat
功
能: 获取一些文件相关的信息
用 法: int lstat(const char *path, struct stat *buf);
参数:
path:文件路径名。
filedes:文件描述词。
buf:是以下结构体的指针
struct stat {
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
uid_t st_uid;
gid_t st_gid;
dev_t st_rdev;
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;