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 id of the created file. Task CreateFileAsync(RepoFile file); /// /// Read a file from the repository. /// /// The id of the file to read. /// Returns the file from the repository. Task ReadFileAsync(string id); /// /// Update a file in the repository. /// /// The id of the file to update. /// Returns a boolean representing whether or not the update was successful. Task UpdateFileAsync(string id); /// /// Delete a file in the repository. /// /// The id of the file to delete. /// Returns a boolean representing whether or not the delete was successful. Task DeleteFileAsync(string id); } }