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

Search list

[Linux-Unixunix仿真

Description: provides implementations of the following UNIX APIs: chdir(), getcwd(), mkdir(), rmdir() dlopen(), dlclose(), dlsym(), dlerror() getpagesize() gettimeofday() link(), unlink() glob(), globfree() mmap(), munmap(), msync() opendir(), readdir(), rewinddir(), closedir() pathconf(), realpath() readv(), writev()
Platform: | Size: 742599 | Author: hqsun_sohu@sohu.com | Hits:

[Windows DevelopOpenDir

Description: 2K/XP,Shell编程,右键单击文件或快捷方式时,增加菜单“查找目标”的功能-2K/XP, Shell programming, right-click files or shortcuts to increase the menu
Platform: | Size: 99328 | Author: wjj | Hits:

[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-Unixtest25

Description: 1.编写程序,从指定目录文件开始,打印目录文件树(opendir, readdir); 2.编写程序,打印指定目录文件下的所有的文件(readdir),同时标识除文件的类型(stat); 3.编写程序,在指定目录文件下创建一个新文件,删除一个指定文件,拷贝指定文件;-Write a program file from the specified directory, print directory file tree (the opendir, the fashion in which readdir) programming, print all the files under the specified directory file (readdir), while logo In addition to the file type (stat) programmingcreate a new file in the specified directory file, delete a specific file, copy the specified file
Platform: | Size: 1024 | Author: 丁占成 | Hits:

[Linux-Unixumut

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

[Windows Developopendir

Description: 本程序实现两种文件来打开指定的文件夹并选中指定的文件,程序用VC2005编译通过,附执行程序。-Two file in the program to open the specified folder and select the file specified, the program VC2005 compiled through with the implementation of the program.
Platform: | Size: 67584 | Author: kevin | 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:

[File Operate1234

Description: 完成一个目录复制命令mycp,包括目录下的文件和子目录, 运行结果如下: beta@bugs.com [~/]# ls -l sem total 56 drwxr-xr-x3 beta beta 4096 Dec 19 02:53 ./ drwxr-xr-x8 beta beta 4096 Nov 27 08:49 ../ -rw-r r 1 beta beta128 Nov 27 09:31 Makefile -rwxr-xr-x1 beta beta 5705 Nov 27 08:50 consumer* -rw-r r 1 beta beta349 Nov 27 09:30 consumer.c drwxr-xr-x2 beta beta 4096 Dec 19 02:53 subdir/ beta@bugs.com [~/]# mycp sem target beta@bugs.com [~/]# ls -l target total 56 drwxr-xr-x3 beta beta 4096 Dec 19 02:53 ./ drwxr-xr-x8 beta beta 4096 Nov 27 08:49 ../ -rw-r r 1 beta beta128 Nov 27 09:31 Makefile -rwxr-xr-x1 beta beta 5705 Nov 27 08:50 consumer* -rw-r r 1 beta beta349 Nov 27 09:30 consumer.c drwxr-xr-x2 beta beta 4096 Dec 19 02:53 subdir/ 说明: Linuk: mkdir,opendir,readdir,symlink,readlink等系统调用 Windows:CreateDirectory,FindFirstFile,FindNextFile等函数-Complete a directory replication command mycp, including files and subdirectories, operating results are as follows: beta@bugs.com [~ /]# ls-l sem total 56 drwxr-xr-x3 beta beta 4096 Dec 19 02:53 ./ drwxr-xr-x8 beta beta 4096 Nov 27 08:49 ../-rw-r- r- 1 beta beta128 Nov 27 09:31 Makefile-rwxr-xr-x1 beta beta 5705 Nov 27 08:50 consumer*-rw-r- r- 1 beta beta349 Nov 27 09:30 consumer.c drwxr-xr-x2 beta beta 4096 Dec 19 02:53 subdir/beta@bugs.com [~ /]# mycp sem target beta @ bugs.com [~ /]# ls-l target total 56 drwxr-xr-x3 beta beta 4096 Dec 19 02:53 ./ drwxr-xr-x8 beta beta 4096 Nov 27 08:49 ../-rw-r r- 1 beta beta128 Nov 27 09:31 Makefile-rwxr-xr-x1 beta beta 5705 Nov 27 08:50 consumer*-rw-r- r- 1 beta beta349 Nov 27 09:30 consumer.c drwxr-xr-x2 beta beta 4096 Dec 19 02:53 subdir/Description: Linuk: mkdir, opendir, readdir, symlink, readlink system calls Windows: CreateDirectory, FindFirstFile, FindNextFile and other functions
Platform: | Size: 5120 | Author: 于冰 | 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:

[Linux-Unixcode

Description: opendir()用来打开参数name 指定的目录, 并返回DIR*形态的目录流, 和open()类似, 接下来对目录的读取和搜索都要使用此返回值.(Opendir () is used to open the directory specified by the parameter name, and returns the directory flow of the DIR* form, similar to open (), and then uses the return value for both the read and the search of the directory)
Platform: | Size: 9216 | Author: 啦啦LA | Hits:

CodeBus www.codebus.net