摘要:
在使用这个结构体和方法时,需要引入:<sys/types.h><sys/stat.h>struct stat这个结构体是用来描述一个linux系统文件系统中的文件属性的结构。可以有两种方法来获取一个文件的属性:1、通过路径:int stat(const char *path, struct stat *struct_stat);int lstat(const char *path,struct stat *struct_stat);两个函数的第一个参数都是文件的路径,第二个参数是struct stat的指针。返回值为0,表示成功执行。执行失败是,error被自动设置为下 阅读全文
posted @ 2013-06-06 11:19
楚云之南
阅读(62830)
评论(2)
推荐(3)

浙公网安备 33010602011771号