码迷,mamicode.com
首页 >  
搜索关键字:opendir    ( 161个结果
perl对字段替换的小问题
今天做一份东西需要对一些文件特定的字段进行修改,其实这改一下很方便,甚至不需要去写一个脚本,但是为了方便使用,同时也是巩固一下perl的知识,便写了这个小脚本。但在写的过程中还是碰到了几个小问题,首先是perl目录切换的问题,我在当前目录readdir、opendir一个目录,并获得文件名以后,需要...
分类:其他好文   时间:2014-10-08 23:55:27    阅读次数:187
c代码读取目录信息
#include #include #include int main(void) { DIR *dp; struct dirent *ep; dp = opendir ("./"); if (dp != NULL) { while ((ep = readdir...
分类:其他好文   时间:2014-09-29 00:24:05    阅读次数:229
遍历目录结构
$dirname="./runtime"; functionfordir($dirname){ $dir=opendir($dirname); readdir($dir); readdir($dir); while(false!==($file=readdir($dir))){ $file=$dirname.‘/‘.$file; if(is_dir($file)){ echo"目录:{$file}<br>"; }else{ echo"..
分类:其他好文   时间:2014-09-24 18:55:27    阅读次数:170
10Linux服务器编程之:opendir()函数,readdir()函数,rewinddir()函数,telldir()函数和seekdir()函数,closedir()函数
?? 1 opendir所需的头文件 #include #include 2函数声明 DIR *opendir(const char *name); DIR *fdopendir(int fd); 通过opendir来打开一个文件夹 3readdir依赖的头文件 #include 4函数声明 struct dirent *readd...
分类:Windows程序   时间:2014-09-16 00:24:29    阅读次数:483
《UNIX环境高级编程》读书笔记之文件与目录(2)
动手练习: (1)自己实现ls命令 #include #include int ls(int argc,char * argv[]) { int i; for(i = 2;i < argc;i++) { DIR * dp; struct dirent *dirp; if((dp = opendir(argv[i])) == NU...
分类:其他好文   时间:2014-09-13 12:07:55    阅读次数:151
opendir()函数
opendir() 函数打开一个目录句柄,可由 closedir(),readdir() 和 rewinddir() 使用。若成功,则该函数返回一个目录流,否则返回 false 以及一个 error。可以通过在函数名前加上 "@" 来隐藏 error 的输出。opendir(path,context...
分类:其他好文   时间:2014-08-28 11:07:49    阅读次数:184
php压缩文件夹
function addFileToZip($path,$zip){$handler=opendir($path); //打开当前文件夹由$path指定。while(($filename=readdir($handler))!==false){if($filename != "." && $file...
分类:Web程序   时间:2014-08-27 12:42:57    阅读次数:203
php递归删除文件夹
function deldir($dir) { //先删除目录下的文件: $dh=opendir($dir); while ($file=readdir($dh)) { if($file!="." && $file!="..") { $fullpath=$dir."/".$fi...
分类:Web程序   时间:2014-08-27 12:32:07    阅读次数:213
Linux系统编程之访问文件夹及其文件属性
1. 文件夹操作:opendir, readdir, closedir 2. 文件属性:lstat 代码示例如下 实现功能:获取指定文件夹下所有的文件(使用递归),因此就能计算所有文件大小之类的啦。。。 #include #include #include #include #include #include #include #include #define BUF_...
分类:系统相关   时间:2014-08-19 20:51:05    阅读次数:350
FATFS 初学之 f_opendir/ f_readdir
f_opendir: 1 /*-----------------------------------------------------------------------*/ 2 /* Create a Directroy Object ...
分类:其他好文   时间:2014-08-13 17:54:06    阅读次数:930
161条   上一页 1 ... 13 14 15 16 17 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!