refactor(*): Remove the id from RepoFile as the filename can be used instead as a UID

This commit is contained in:
Josh Creek
2021-08-30 00:06:33 +01:00
parent 314cec2ac2
commit 8eafe54fc2
2 changed files with 9 additions and 16 deletions
+7 -7
View File
@@ -14,28 +14,28 @@ namespace FileRepository
/// Create a file in the repository.
/// </summary>
/// <param name="file">The file to store.</param>
/// <returns>Returns a string id of the created file.</returns>
/// <returns>Returns a string fileName of the created file.</returns>
Task<string> CreateFileAsync(RepoFile file);
/// <summary>
/// Read a file from the repository.
/// </summary>
/// <param name="id">The id of the file to read.</param>
/// <param name="fileName">The file name of the file to read.</param>
/// <returns>Returns the file from the repository.</returns>
Task<RepoFile> ReadFileAsync(string id);
Task<RepoFile> ReadFileAsync(string fileName);
/// <summary>
/// Update a file in the repository.
/// </summary>
/// <param name="id">The id of the file to update.</param>
/// <param name="fileName">The file name of the file to update.</param>
/// <returns>Returns a boolean representing whether or not the update was successful.</returns>
Task<bool> UpdateFileAsync(string id);
Task<bool> UpdateFileAsync(string fileName);
/// <summary>
/// Delete a file in the repository.
/// </summary>
/// <param name="id">The id of the file to delete.</param>
/// <param name="fileName">The file name of the file to delete.</param>
/// <returns>Returns a boolean representing whether or not the delete was successful.</returns>
Task<bool> DeleteFileAsync(string id);
Task<bool> DeleteFileAsync(string fileName);
}
}