遍历本机磁盘
来源:互联网 发布:python有趣小程序教程 编辑:程序博客网 时间:2024/05/03 15:20
using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.IO;
namespace bainli
{
class Program
{
class aa
{
private ArrayList FilePath = new ArrayList();
private ArrayList FileName = new ArrayList();
public ArrayList GetFilePath
{
get { return FilePath; }
}
public ArrayList GetFileName
{
get { return FileName; }
}
public void ListAll(DirectoryInfo source)
{
foreach (FileInfo f1 in source.GetFiles())
{
FilePath.Add(f1.FullName + f1.Name);
FileName.Add(f1.Name);
Console.WriteLine(f1.FullName);
}
foreach (DirectoryInfo childinfo in source.GetDirectories())
{
ListAll(childinfo);
}
}
public void FileList(string sourceDirectory)
{
DirectoryInfo info = new DirectoryInfo(sourceDirectory);
ListAll(info);
}
}
static void Main(string[] args)
{
aa a = new aa();
a.FileList("E:/desk");
Console.ReadLine();
}
}
}
- 遍历本机磁盘
- 遍历磁盘
- 遍历磁盘
- C#获取本机磁盘信息
- 【工作记录】筛选、查询本机磁盘
- 【C#】遍历本机IPV4地址
- 将本机文件夹映射为磁盘的方法
- 如何将ftp服务器映射为本机磁盘
- 磁盘文件遍历
- C遍历磁盘文件
- 遍历磁盘类型
- java 遍历磁盘目录
- 遍历所有磁盘文件
- 遍历磁盘信息
- java遍历磁盘目录
- 使用TreeView遍历磁盘目录
- C语言 遍历磁盘目录
- java遍历磁盘或文件夹
- 快乐至上…… 只为博您一笑!
- Remember The Milk:Smart Add
- JSON在JAVA中的操作
- jBPM 3 流程模型
- C#3.0基于 Speech.Recognition的SRGS 语音识别定义模糊语法范例
- 遍历本机磁盘
- 监控 SQL Server 的运行状况
- STL容器特征总结(含迭代器失效)
- 常用系统存储过程
- 十年总结(16):主动的自我改造(或者说转型?)
- HTTP请求流程(一)----流程简介
- Using Silverlight Shape Controls....Path, Rectangle...
- Frameset打印frame的问题
- java.lang.OutOfMemoryError: Java heap space