mirror of
https://github.com/jcreek/Creek.FileRepository.git
synced 2026-07-12 18:33:43 +00:00
refactor(*): Rename FileName to Filename across the whole solution for consistency
This commit is contained in:
@@ -11,7 +11,7 @@ namespace FileRepository.Models
|
||||
/// <summary>
|
||||
/// Gets or sets the actual file name of the file, this serves as the key field/unique identifier.
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
public string Filename { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the contents of the file, as a stream for easy manipulation.
|
||||
@@ -26,14 +26,14 @@ namespace FileRepository.Models
|
||||
/// <summary>
|
||||
/// Initialise a File model based on passed parameters.
|
||||
/// </summary>
|
||||
/// <param name="fileName">The filename of the file.</param>
|
||||
/// <param name="filename">The filename of the file.</param>
|
||||
/// <param name="content">The content of the file.</param>
|
||||
/// <returns>Returns an initialised File object.</returns>
|
||||
public RepoFile GenerateFile(string fileName, Stream content)
|
||||
public RepoFile GenerateFile(string filename, Stream content)
|
||||
{
|
||||
RepoFile newFile = new RepoFile()
|
||||
{
|
||||
FileName = fileName,
|
||||
Filename = filename,
|
||||
Content = content,
|
||||
Created = DateTime.Now,
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace FileRepository.Repositories
|
||||
bool canOverride = false;
|
||||
UploadFile(file, canOverride);
|
||||
|
||||
return file.FileName;
|
||||
return file.Filename;
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteFileAsync(string fileName)
|
||||
@@ -106,7 +106,7 @@ namespace FileRepository.Repositories
|
||||
client.Connect();
|
||||
client.ChangeDirectory(this.remoteDirectoryPath);
|
||||
|
||||
client.UploadFile(file.Content, file.FileName, canOverride);
|
||||
client.UploadFile(file.Content, file.Filename, canOverride);
|
||||
|
||||
//_logger.LogInformation($"Finished uploading file {file.FileName} to [{remoteDirectory}]");
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace UnitTests
|
||||
RepoFile repoFile = await fileRepository.ReadFileAsync(filename);
|
||||
|
||||
Assert.NotNull(repoFile);
|
||||
Assert.NotNull(repoFile.FileName);
|
||||
Assert.NotNull(repoFile.Filename);
|
||||
Assert.NotNull(repoFile.Content);
|
||||
Assert.NotNull(repoFile.Created);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user