Interface for an abstract file store. Declares operations to check for directories and files, create directories, list files, read file contents synchronously, and write new files asynchronously with cancellation support.
namespace SboxSuperuser.Core.Storage;
internal interface IStoreFiles
{
bool DirectoryExists( string directory );
bool FileExists( string path );
void CreateDirectory( string directory );
IReadOnlyList<string> ListFiles( string directory );
string Read( string path );
Task WriteNewAsync( string path, string content, CancellationToken cancellation );
}