FilePath ready to test

This commit is contained in:
2023-12-24 11:29:36 -07:00
parent af491371a3
commit 7007a9df2e
60 changed files with 960 additions and 857 deletions

View File

@ -21,6 +21,24 @@ public interface IFileHolder
Models.FileHolder TestStatic_Refresh(Models.FileHolder fileHolder) =>
Refresh(fileHolder);
static Models.FileHolder Refresh(Models.FileHolder fileHolder) =>
new(fileHolder.FullName);
Get(fileHolder.FullName);
Models.FileHolder TestStatic_Get(string fileName) =>
Get(fileName);
static Models.FileHolder Get(string fileName) =>
Models.FileHolder.Get(new FileInfo(fileName));
Models.FileHolder TestStatic_Get(FilePath filePath) =>
Get(filePath);
static Models.FileHolder Get(FilePath filePath) =>
new(new(filePath.CreationTicks),
filePath.DirectoryName,
true,
filePath.ExtensionLowered,
filePath.FullName,
new(filePath.LastWriteTicks),
filePath.Length,
filePath.Name,
filePath.NameWithoutExtension);
}