private void Decompress(string dataFileFullName)
 {
     try
     {
         Log.Info("Deompressing file '{0}'...".FormatWith(dataFileFullName));
         string decompressedFileFullName = ZipHelper.DecompressFile(dataFileFullName);
         Log.Info("Decompressed file '{0}' to '{1}'.".FormatWith(dataFileFullName, decompressedFileFullName));
     }
     catch (Exception ex)
     {
         this.DecompressExceptions.Add(ExceptionHelper.CentralProcessSingle2(ex));
     }
 }
Пример #2
0
        /// <summary>
        /// Decompresses the data files.
        /// </summary>
        private void DecompressDataFiles()
        {
            DirectoryInfo di = new DirectoryInfo(Settings.Default.DataImporter_DataDirectory);

            Log.Info("Decompressing data files under '{0}'...".FormatWith(Settings.Default.DataImporter_DataDirectory));
            if (di.Exists)
            {
                foreach (FileInfo fi in di.GetFiles("*.gz", SearchOption.TopDirectoryOnly))
                {
                    Log.Info("Decompressing data file '{0}'...".FormatWith(fi.FullName));
                    ZipHelper.DecompressFile(fi.FullName);
                    Log.Info("Decompressed data file '{0}'.", fi.FullName);
                }
            }
        }