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