Пример #1
0
 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;
 }
Пример #2
0
 public static void setWorkingFolder(WorkingFolder folder)
 {
     HttpContext.Current.Session.Remove("WorkingFolder");
     HttpContext.Current.Session.Add("WorkingFolder", folder);
 }
Пример #3
0
        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));
            }
        }