コード例 #1
0
 private void AddFileEntries(BaseDirectoryEntry baseDirectoryEntry, string fullyQualifiedFileName)
 {
     if (!UniqueFiles.ContainsKey(fullyQualifiedFileName))
     {
         var             fileEntry = new FileEntry(baseDirectoryEntry.Number, fullyQualifiedFileName);
         FileInfoHandler info      = fileEntry.Info;
         long            length    = info.Length;
         if (length > int.MaxValue || length == 0L || info.Name.StartsWith("."))
         {
             return;
         }
         UniqueFiles.Add(fullyQualifiedFileName, fileEntry);
         var lengthList = FilesByLength.ContainsKey(length) ? FilesByLength[length] : null;
         if (lengthList == null)
         {
             lengthList = new List <FileEntry>();
             FilesByLength.Add(length, lengthList);
         }
         FilesByLength[length].Add(fileEntry);
     }
 }
コード例 #2
0
ファイル: FileEntry.cs プロジェクト: semuhphor/DupeFerret
 public FileEntry(int baseDirectoryKey, string fqfn, FileInfoHandler handler)
 {
     this.BaseDirectoryKey = baseDirectoryKey;
     this.FQFN             = fqfn;
     this.Info             = handler;
 }