public WorkingFolder LoadWorkingFolder(DirectoryInfo dirInfo) { WorkingFolder folder; folder = new WorkingFolder(dirInfo); foreach (DirectoryInfo dir in dirInfo.GetDirectories()) { folder.AddFile(LoadFolder(dir)); } foreach (FileInfo file in dirInfo.GetFiles()) { folder.AddFile(LoadFile(file)); } return folder; }
public void RefreshWorkingFolder(WorkingFolder wf) { wf.ClearFiles(); DirectoryInfo dirInfo = (DirectoryInfo)wf.File; foreach (DirectoryInfo dir in dirInfo.GetDirectories()) { wf.AddFile(LoadFolder(dir)); } foreach (FileInfo file in dirInfo.GetFiles()) { wf.AddFile(LoadFile(file)); } }