Esempio n. 1
0
 public void EnsureCacheDirectory()
 {
     _logger.LogDebug("Checking if valid Cache directory: {CacheDirectory}", CacheDirectory);
     if (!DirectoryService.ExistOrCreate(CacheDirectory))
     {
         _logger.LogError("Cache directory {CacheDirectory} is not accessible or does not exist. Creating...", CacheDirectory);
     }
 }
Esempio n. 2
0
 private static void ExtractArchiveEntities(IEnumerable <IArchiveEntry> entries, string extractPath)
 {
     DirectoryService.ExistOrCreate(extractPath);
     foreach (var entry in entries)
     {
         entry.WriteToDirectory(extractPath, new ExtractionOptions()
         {
             ExtractFullPath = false,
             Overwrite       = false
         });
     }
 }
Esempio n. 3
0
        public void CleanupTemp()
        {
            var tempDirectory = Path.Join(Directory.GetCurrentDirectory(), "temp");

            BackgroundJob.Enqueue((() => DirectoryService.ClearDirectory(tempDirectory)));
        }