using System;
using SystemCollectionsGeneric;
using SystemCollections;
using SystemText;
using SystemIO;
namespace JiangmingxiangProgramFileList
{
public class FileList
{
//字段声明
private ArrayList myfilelistpath = new ArrayList();
private ArrayList myfilelistname = new ArrayList();
//属性声明
public ArrayList GetFileListPath
{
get { return myfilelistpath; }
}
public ArrayList GetFileListName
{
get { return myfilelistname; }
}
//构造函数
public FileList(string sourceDirectory)
{
DirectoryInfo diSource = new DirectoryInfo(sourceDirectory);
ListAll(diSource);
}
public void ListAll(DirectoryInfo source)
{
foreach (FileInfo fi in sourceGetFiles())
{
myfilelistpathAdd(fiFullName + fiName);
myfilelistnameAdd(fiName);
}
foreach (DirectoryInfo diSourceSubDir in sourceGetDirectories())
{
ListAll(diSourceSubDir);
}
}
}
}