- 博客(3)
- 收藏
- 关注
翻译 Linux c 目录操作函数scandir
scandir #include int scandir( const char *dir, struct dirent **namelist, int (*filter) (const void *b), int ( * compare )( const struct dirent **, const struct dirent ** ) );
2011-11-22 14:22:04
6684
转载 S_ISDIR()函数
S_ISDIR()函数功能是判断一个路径是否为目录在sys/stat.h中还定义了更多相关的函数The following symbolic names for the values of type mode_t shall also be defined.File type:S_IFMTType of file.S_IFBLKBlock special.
2011-11-08 19:54:04
21506
转载 Linux stat函数讲解
Linux stat函数讲解:表头文件: #include #include 定义函数: int stat(const char *file_name, struct stat *buf); 函数说明: 通过文件名filename获取文件信息,并保存在buf所指的结构体stat中返回值: 执行成功则返回0,失败返回-1,错误
2011-11-08 18:56:26
732
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人