Moved some files around, fixed Log file fetching to use zip and work more reliably. Refactored some code in directory service.

This commit is contained in:
Joseph Milazzo 2021-02-24 15:58:17 -06:00
parent bbb4240e20
commit ecfb40cb2d
15 changed files with 128 additions and 47 deletions

View file

@ -11,5 +11,6 @@ namespace API.Interfaces.Services
byte[] GetCoverImage(string filepath, bool createThumbnail = false);
bool IsValidArchive(string archivePath);
string GetSummaryInfo(string archivePath);
}
}

View file

@ -1,7 +1,17 @@
namespace API.Interfaces.Services
using System.Collections.Generic;
using Microsoft.Extensions.Configuration;
namespace API.Interfaces.Services
{
public interface IBackupService
{
void BackupDatabase();
/// <summary>
/// Returns a list of full paths of the logs files detailed in <see cref="IConfiguration"/>.
/// </summary>
/// <param name="maxRollingFiles"></param>
/// <param name="logFileName"></param>
/// <returns></returns>
IEnumerable<string> LogFiles(int maxRollingFiles, string logFileName);
}
}

View file

@ -0,0 +1,7 @@
namespace API.Interfaces.Services
{
public interface ICleanupService
{
void Cleanup();
}
}

View file

@ -29,6 +29,8 @@ namespace API.Interfaces.Services
/// <returns></returns>
bool ExistOrCreate(string directoryPath);
Task<byte[]> ReadFileAsync(string path);
/// <summary>
/// Deletes all files within the directory, then the directory itself.
/// </summary>