protected void getAllDirs(string path)
{
DirectoryInfo dirinfo = new DirectoryInfo(@path);
DirectoryInfo[] dirs = dirinfo.GetDirectories();
for (int i = 0; i < dirs.Length; i++) {
Response.Write(dirs[i].FullName + "<br>");//页面上打印输出
getAllDirs(dirs[i].FullName);//递归
}
}
MSN:
posted on 2009-07-16 20:31
kylixlu 阅读(176)
评论(0) 编辑 收藏 所属分类:
dotNet