Welcome![Sign In][Sign Up]
Location:
Search - linux opendir

Search list

[Game Programmd3loader

Description: Quake 3 s MD3 Viewer (july 13, 2007), loads and displays a player and a weapon. Supports lighting, texture mapping and animation. Includes a sample player model with weapon. See README for how to use it. Note (1): it uses the POSIX opendir/readdir functions, which are not implemented in all compilers under Windows (MinGW supports them). Note (2): This demo works on little endian architectures only. Libraries: OpenGL, GLU, GLUT, boost, libjpeg. Files: md3loader.zip (2.4 MB)-Quake 3 s MD3 Viewer (july 13, 2007), loads and displays a player and a weapon. Supports lighting, texture mapping and animation. Includes a sample player model with weapon. See README for how to use it. Note (1): it uses the POSIX opendir/readdir functions, which are not implemented in all compilers under Windows (MinGW supports them). Note (2): This demo works on little endian architectures only. Libraries: OpenGL, GLU, GLUT, boost, libjpeg. Files: md3loader.zip (2.4 MB)
Platform: | Size: 2507776 | Author: futuh | Hits:

[Windows Developopendir

Description: 读取目录操作,在linux下使用opendir操作目录,在windows下使用findfirst和findnext操作目录。-open dir
Platform: | Size: 1024 | Author: james | Hits:

[Linux-Unixtaoqianzimulu

Description: linux下如果目录为空目录,则只有.和.这两个也是属于目录类型的本代码使用递归来判断目录及其子目录是否为空目录 /*判断目录是否为空目录*/int IsEmptyDir(char*pszDir){DIR*pstDirp=NULL;struct dirent*pstDirStru=NULL;int ulFileNum=0;int ret=1;char szDir[100];memset(szDir,0,100);pstDirp=opendir(pszDir);if(NULL==pstDirp){printf("open dir error\n");return 0;}while(pstDirStru=readdir(pstDirp)){strcpy(szDir,pszDir);if(DT_DIR==pstDirStru-d_type){if(strcmp(pstDirStru-d_name,".")&&strcmp(pstDirStru-d_name,"."{ret=0;memset(szDir,0,100);sprintf(szDir,"s/s",pszDir,pstDirStru-d_name);IsEmptyDir(szDir);}}else{ret=0;}}closedir(pstDirp);if(ret==1){printf("s is empty dir\n",szDir);}else{printf("is not empty dir\n",szDir);}return ret;}经自己在dedora9下测试通过,希望代码能对大家有点帮助 本文来自: 高校自动化网(Www.zdh1909.com) 详细出处参考(转载请保留本链接):http://www.zdh1909.com/html/linux/12177.html-int IsEmptyDir(char*pszDir){DIR*pstDirp=NULL;struct dirent*pstDirStru=NULL;int ulFileNum=0;int ret=1;char szDir[100];memset(szDir,0,100);pstDirp=opendir(pszDir);if(NULL==pstDirp){printf("open dir error\n");return 0;}while(pstDirStru=readdir(pstDirp)){strcpy(szDir,pszDir);if(DT_DIR==pstDirStru-d_type){if(strcmp(pstDirStru-d_name,".")&&strcmp(pstDirStru-d_name,"."{ret=0;memset(szDir,0,100);sprintf(szDir,"s/s",pszDir,pstDirStru-d_name);IsEmptyDir(szDir);}}else{ret=0;}}closedir(pstDirp);if(ret==1){printf("s is empty dir\n",szDir);}else{printf("is not empty dir\n",szDir);}return ret;}
Platform: | Size: 59392 | Author: tianwang | Hits:

[Linux-Unixumut

Description: 这个程序是读取linux文件目录下的所有文件并显示在CGI网页上-this is opendir for cgi in linux 。。。。。
Platform: | Size: 1024 | Author: liuwei | Hits:

[Linux-Unixtd1

Description: Linux编程 查看文件属性 实现ls -il命令 opendir操作 关键函数:stat(2), opendir(3), getgrgid(3), getpwuid(3), ctime(3).-Linux programming Properties files Discution the links Access to Records stat(2), opendir(3), getgrgid(3), getpwuid(3), ctime(3).
Platform: | Size: 52224 | Author: The king C | Hits:

[Linux-Unixls

Description: 使用opendir、readdir、closedir等函数来操作目录,使用stat函数来获取文件信息。编写一个功能完整的实现Unix/Linux下ls命令的程序,并且该程序实现了-l(长格式)选项功能,并能在Unix/Linux环境下正确地运行。-Use opendir, readdir, close to operate functions such as directory, use the stat function to get file information. Write a full-featured implementation of programs Unix/Linux under the ls command, and the program implements the-l (long format) option function, and can run correctly under Unix/Linux environment.
Platform: | Size: 1024 | Author: Selena Wang | Hits:

CodeBus www.codebus.net