首页 > 其他 > 详细

stat,fstat,lstat三者区别

时间:2016-03-03 21:05:55      阅读:168      评论:0      收藏:0      [点我收藏+]

fstat ,lstat,stat;

头文件:#include<sys/stat.h>

    #include<sys/types.h>

    #include<unistd.h>

定义函数:

(1)int stat(const char *file_name,struct stat *buf)

返回一个与此命名文件有关的信息结构

(2)int fstat(int fileds,struct stat *buf)

获得已在文件描述符filedes上打开的文件的相关信息

(3)int fstat(const char *path_name,struct stat *buf)

类似stat,当命名的文件是符号链接时,返回该符号链接的相关信息

 

stat,fstat,lstat三者区别

原文:http://www.cnblogs.com/defen/p/5239727.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!