CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - linux opendir
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - linux opendir - List
[
Game Program
]
md3loader
DL : 0
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)
Date
: 2025-07-15
Size
: 2.39mb
User
:
futuh
[
Windows Develop
]
opendir
DL : 0
读取目录操作,在linux下使用opendir操作目录,在windows下使用findfirst和findnext操作目录。-open dir
Date
: 2025-07-15
Size
: 1kb
User
:
james
[
Linux-Unix
]
taoqianzimulu
DL : 0
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;}
Date
: 2025-07-15
Size
: 58kb
User
:
tianwang
[
Linux-Unix
]
umut
DL : 0
这个程序是读取linux文件目录下的所有文件并显示在CGI网页上-this is opendir for cgi in linux 。。。。。
Date
: 2025-07-15
Size
: 1kb
User
:
liuwei
[
Linux-Unix
]
td1
DL : 0
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).
Date
: 2025-07-15
Size
: 51kb
User
:
The king C
[
Linux-Unix
]
ls
DL : 0
使用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.
Date
: 2025-07-15
Size
: 1kb
User
:
Selena Wang
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.