Example #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);
     }
 }
Example #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
         });
     }
 }
Example #3
0
        public void CleanupTemp()
        {
            var tempDirectory = Path.Join(Directory.GetCurrentDirectory(), "temp");

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