microsoftxiao

记忆 流逝

导航

2006年3月6日 #

VB.NET遍历目录和文件

摘要: 这里是一个利用System.Directory来进行显示目录和文件的示例。[code]'Imports System.CollectionsImports System.IOImports System Module Module1 Sub Main() Dim path As String Dim m_files As String D... 阅读全文

posted @ 2006-03-06 21:22 龙巢NET刀 阅读(2985) 评论(0) 推荐(0)

遍历目录又一C

摘要: [code]void scanAllFiles( char *filePath ){struct _finddata_t fileInfo;int done;char filePathCpy[MAX_PATH]; strcpy( filePathCpy, filePath );done = _findfirst( filePath, &fileInfo );if( done == -1 ) //... 阅读全文

posted @ 2006-03-06 16:31 龙巢NET刀 阅读(459) 评论(0) 推荐(0)

遍历文件和目录C

摘要: [code]通过 io.h中的 _findfirst函数 和 _findnext函数可以实现 目录和文件的遍历。但是如果我们想让文件和目录区分开,并在目录旁标识出又该怎样做呢?int handledir(const char* filepath,int flag){ struct _finddata_t t; intptr_t a; intptr_t n = 0,b; if(flag){ ch... 阅读全文

posted @ 2006-03-06 16:17 龙巢NET刀 阅读(358) 评论(0) 推荐(0)