You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
820 B
33 lines
820 B
2 years ago
|
using Recyclarr.TrashLib.Startup;
|
||
2 years ago
|
using Serilog;
|
||
|
|
||
2 years ago
|
namespace Recyclarr.Cli.Console.Setup;
|
||
2 years ago
|
|
||
|
public class AppPathSetupTask : IBaseCommandSetupTask
|
||
|
{
|
||
|
private readonly ILogger _log;
|
||
|
private readonly IAppPaths _paths;
|
||
|
|
||
|
public AppPathSetupTask(ILogger log, IAppPaths paths)
|
||
|
{
|
||
|
_log = log;
|
||
|
_paths = paths;
|
||
|
}
|
||
|
|
||
|
public void OnStart()
|
||
|
{
|
||
|
_log.Debug("App Data Dir: {AppData}", _paths.AppDataDirectory);
|
||
|
|
||
|
// Initialize other directories used throughout the application
|
||
2 years ago
|
// Do not initialize the repo directory here; the GitRepositoryFactory handles that later.
|
||
2 years ago
|
_paths.CacheDirectory.Create();
|
||
|
_paths.LogDirectory.Create();
|
||
2 years ago
|
_paths.ConfigsDirectory.Create();
|
||
2 years ago
|
}
|
||
|
|
||
|
public void OnFinish()
|
||
|
{
|
||
2 years ago
|
// No work to do for this event
|
||
2 years ago
|
}
|
||
|
}
|