Code/SboxSuperuser/Core/Storage/IStoreFiles.cs

Interface for an abstract file storage used by the superuser module. Declares synchronous checks for directory/file existence, directory creation, listing files, reading a file synchronously, and an async method to write a new file.

File Access
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 );
}