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

@ -5,7 +5,7 @@ using View_by_Distance.Shared.Models.Stateless.Methods;
namespace View_by_Distance.Shared.Models;
public record FilePath(long CreationTicks,
string DirectoryName,
string DirectoryFullPath,
string ExtensionLowered,
string FileNameFirstSegment,
string FullName,
@ -41,7 +41,7 @@ public record FilePath(long CreationTicks,
int? sortOder;
string fileNameFirstSegment = fileHolder.Name.Split('.')[0];
int sortOrderOnlyLengthIndex = metadataConfiguration.Offset.ToString().Length;
string fileDirectoryName = fileHolder.DirectoryName ?? throw new NullReferenceException();
string fileDirectoryFullPath = fileHolder.DirectoryFullPath ?? throw new NullReferenceException();
bool isIntelligentIdFormat = IId.NameWithoutExtensionIsIntelligentIdFormat(metadataConfiguration, fileNameFirstSegment);
bool isPaddedIntelligentIdFormat = IId.NameWithoutExtensionIsPaddedIntelligentIdFormat(metadataConfiguration, sortOrderOnlyLengthIndex, fileNameFirstSegment);
bool fileNameFirstSegmentIsIdFormat = !isPaddedIntelligentIdFormat && !isIntelligentIdFormat && IId.NameWithoutExtensionIsIdFormat(metadataConfiguration, fileHolder);
@ -69,7 +69,7 @@ public record FilePath(long CreationTicks,
else
throw new NotSupportedException();
result = new(fileHolder.CreationTime.Value.Ticks,
fileDirectoryName,
fileDirectoryFullPath,
fileHolder.ExtensionLowered,
fileNameFirstSegment,
fileHolder.FullName,