using FileRepository.Models; using System; using System.IO; using System.Threading.Tasks; namespace FileRepository { /// /// A repository interface to ensure that all storage repositories implement all the required methods, and that the methods are all generic. /// public interface IFileRepository { /// /// Create a file in the repository. /// /// The file to store. /// Returns a string fileName of the created file. Task CreateFileAsync(RepoFile file); /// /// Read a file from the repository. /// /// The file name of the file to read. /// Returns the file from the repository. Task ReadFileAsync(string fileName); /// /// Update a file in the repository. /// /// The file to store. /// Returns a boolean representing whether or not the update was successful. Task UpdateFileAsync(RepoFile file); /// /// Delete a file in the repository. /// /// The file name of the file to delete. /// Returns a boolean representing whether or not the delete was successful. Task DeleteFileAsync(string fileName); } }