dirent.h

 
#include <dirent.h>
是POSIX.1标准定义的unix类目录操作的头文件,包含了许多UNIX系统服务的函数原型,例如opendir函数、readdir函数.
opendir函数:
DIR *opendir(const char *pathname);返回值:若成功则返回指针,若出错则返回NULL。
struct dirent *readdir(DIR *dp);     返回值:若成功则返回指针,若在目录结尾或出错则返回NULL。
原文地址:https://www.cnblogs.com/nufangrensheng/p/2953393.html