20 lines
582 B
C#
20 lines
582 B
C#
namespace Zcbot.WindowsNode;
|
|
|
|
internal interface IDataRootManagementService
|
|
{
|
|
NodeDataRootSelection ReadSelection();
|
|
bool HasPendingJobs { get; }
|
|
string Normalize(string path);
|
|
}
|
|
|
|
internal sealed class DataRootManagementService(NodePaths paths) : IDataRootManagementService
|
|
{
|
|
private readonly JobRepository jobs = new(paths.JobsDirectory);
|
|
|
|
public NodeDataRootSelection ReadSelection() => NodeDataRootSettings.Resolve();
|
|
|
|
public bool HasPendingJobs => jobs.HasPendingJobs;
|
|
|
|
public string Normalize(string path) => NodeDataRootSettings.Normalize(path);
|
|
}
|