Code/SboxSuperuser/Core/Storage/IStoreFiles.cs

An internal interface for a file storage abstraction. Declares directory and file existence checks, directory creation, listing, reading, and an async write that refuses to overwrite existing files.

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