示例#1
0
 /// <summary>
 /// Caches the files in this directory
 /// </summary>
 public void CacheFiles()
 {
     if (Files == null)
     {
         Dictionary <string, FileItem> NewFiles = new Dictionary <string, FileItem>(FileReference.Comparer);
         if (Info.Exists)
         {
             foreach (FileInfo FileInfo in Info.EnumerateFiles())
             {
                 FileItem FileItem = FileItem.GetItemByFileInfo(FileInfo);
                 FileItem.UpdateCachedDirectory(this);
                 NewFiles[FileInfo.Name] = FileItem;
             }
         }
         Files = NewFiles;
     }
 }