InPlaceMoveDirectory

DirectoryName => DirectoryFullPath
This commit is contained in:
2024-11-02 14:43:53 -07:00
parent 2f75667f20
commit 368390b353
9 changed files with 121 additions and 73 deletions

View File

@ -3,21 +3,16 @@ namespace View_by_Distance.Shared.Models.Stateless.Methods;
public interface IDate
{
(bool?, string[]) TestStatic_IsWrongYear(string[] segments, string year) =>
IsWrongYear(segments, year);
static (bool?, string[]) IsWrongYear(string[] segments, string year) =>
XDate.IsWrongYear(segments, year);
(bool?, string[]) TestStatic_IsWrongYear(FilePath filePath, ExifDirectory exifDirectory) =>
IsWrongYear(filePath, exifDirectory);
static (bool?, string[]) IsWrongYear(FilePath filePath, ExifDirectory exifDirectory) =>
XDate.IsWrongYear(filePath, exifDirectory);
(int Season, string seasonName) TestStatic_GetSeason(int dayOfYear) =>
GetSeason(dayOfYear);
static (int Season, string seasonName) GetSeason(int dayOfYear) =>
XDate.GetSeason(dayOfYear);
(int Season, string seasonName) TestStatic_GetSeasonAB(int dayOfYear) =>
GetSeasonAB(dayOfYear);
static (int Season, string seasonName) GetSeasonAB(int dayOfYear) =>
XDate.GetSeasonAB(dayOfYear);
DateTime? TestStatic_GetDateTimeOriginal(ExifDirectory exifDirectory) =>
GetDateTimeOriginal(exifDirectory);
static DateTime? GetDateTimeOriginal(ExifDirectory exifDirectory) =>

View File

@ -26,14 +26,14 @@ public interface IId
string TestStatic_GetIgnoreFullPath(FilePath filePath, FileHolder fileHolder) =>
GetIgnoreFullPath(filePath, fileHolder);
static string GetIgnoreFullPath(FilePath filePath, FileHolder fileHolder) =>
fileHolder.DirectoryName is null ?
fileHolder.DirectoryFullPath is null ?
throw new NotSupportedException() :
filePath.Id > -1 ?
fileHolder.NameWithoutExtension[^1] == '9' ?
Path.Combine(fileHolder.DirectoryName, $"{fileHolder.NameWithoutExtension[..^1]}8{fileHolder.ExtensionLowered}") :
Path.Combine(fileHolder.DirectoryFullPath, $"{fileHolder.NameWithoutExtension[..^1]}8{fileHolder.ExtensionLowered}") :
throw new NotSupportedException("High") :
fileHolder.NameWithoutExtension[^1] == '1' ?
Path.Combine(fileHolder.DirectoryName, $"{fileHolder.NameWithoutExtension[..^1]}2{fileHolder.ExtensionLowered}") :
Path.Combine(fileHolder.DirectoryFullPath, $"{fileHolder.NameWithoutExtension[..^1]}2{fileHolder.ExtensionLowered}") :
throw new NotSupportedException("Low");
bool TestStatic_NameWithoutExtensionIsIntelligentIdFormat(MetadataConfiguration metadataConfiguration, string fileNameFirstSegment) =>