filenode* getfilesname(char *dir, int *pno) { DIR *dir_prt; struct dirent *entry; struct fi
来源:互联网 发布:国外源码网站 编辑:程序博客网 时间:2024/06/09 21:42
filenode* getfilesname(char *dir, int *pno){ DIR *dir_prt; struct dirent *entry; struct filelist start = {{0}, NULL}; struct filelist *filesnod; filesnod = &start; *pno = -2; dir_prt = opendir(dir); if(!dir_prt) { return NULL; } while(NULL != (entry = readdir(dir_prt))) { filesnod->next = (struct filelist *)malloc(sizeof(filenode)); filesnod = filesnod->next; strcpy(filesnod->filename, entry->d_name); filesnod->next = NULL; (*pno)++; } closedir(dir_prt); filesnod = start.next; if(0 == filesnod->filename[0]) { return NULL; } return filesnod;}
- filenode* getfilesname(char *dir, int *pno) { DIR *dir_prt; struct dirent *entry; struct fi
- struct dirent和DIR
- scandir 读取特定目录的数据表头文件:#include 定义函数:int scandir(const char *dir, struct dirent **namelist, nt (*select) (const struct dirent
- struct dirent 和 DIR结构体 详解
- struct dirent和DIR结构体
- Linux下struct dirent,DIR,struct stat使用例子
- dir stat dirent
- struct dirent
- struct dirent
- struct dirent的char d_name[1]成员
- dirent结构 & DIR结构 定义
- 结构体DIR和dirent
- struct dirent成员
- AIX:struct dirent d_type
- dir
- dir
- Dir
- dir
- 一些不错的技术网站
- 俄籍大提琴手辱骂中国女乘客道歉被指无诚意
- mysql 完整的存储过程
- 给做假网站的提个醒——我承认我无聊了
- linux 分区 挂载点之间的关系
- filenode* getfilesname(char *dir, int *pno) { DIR *dir_prt; struct dirent *entry; struct fi
- 周总结
- 得到电话状态(WIFI状态,厂商,运营商等)的工具类
- JSP使用存储过程
- 神秘的auto_ptr
- TCP 、UDP、IP包的最大长度是多少?
- Python os模块
- zoj 3228 Searching the String【ac自动机】
- 犯了个极其郁闷的小错误