示例#1
0
        /// <summary>
        /// Function that makes the DirectoryData being read from corresponding Fhsks files with checking
        /// that the read data is correct at the moment it being read. If the data wasnt correct it would update the files
        /// and re-calculate hashes if its needed with reading new files.
        /// </summary>
        private void ReadFhsksAndGetLatestFileData()
        {
            string        FhsksFilePath  = FhsksIO.GetCorrespondingFhsksFilePath(RootPath);
            DirectoryData currentFhsksDD = FhsksIO.ReadDirectoryDataFromFile(FhsksFilePath);

            List <LoadedFileStatus> statusList = FileStatusLoader.CheckFileStatusesOfDirectoryData(currentFhsksDD);

            FileStatusLoader.RemoveNotExistingFiles(statusList, currentFhsksDD);
            FileStatusLoader.UpdateModifiedFilesData(statusList, currentFhsksDD);
            FileStatusLoader.AddNewFiles(statusList, currentFhsksDD);

            this.Files = currentFhsksDD.Files;
        }
示例#2
0
 public void SaveHashes()
 {
     FhsksIO.WriteDirectoryDataToFile(this, FhsksIO.GetCorrespondingFhsksFilePath(this.RootPath));
 }