ResultAllInOneSubdirectoryLength
This commit is contained in:
@ -364,6 +364,30 @@ internal abstract class Property
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static bool NameWithoutExtensionIsIdFormat(string[] validImageFormatExtensions, Models.FileHolder fileHolder)
|
||||
{
|
||||
bool result;
|
||||
bool changed;
|
||||
string? fileNameWithoutExtension = fileHolder.NameWithoutExtension;
|
||||
for (int i = 0; i < validImageFormatExtensions.Length; i++)
|
||||
{
|
||||
changed = false;
|
||||
foreach (string validImageFormatExtension in validImageFormatExtensions)
|
||||
{
|
||||
if (fileNameWithoutExtension.EndsWith(validImageFormatExtension))
|
||||
{
|
||||
changed = true;
|
||||
fileNameWithoutExtension = fileNameWithoutExtension[..^validImageFormatExtension.Length];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!changed)
|
||||
break;
|
||||
}
|
||||
result = NameWithoutExtensionIsIdFormat(fileNameWithoutExtension);
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma warning disable CA1416
|
||||
|
||||
internal static (DateTime?, DateTime?[], int?, string?) Get(Models.FileHolder fileHolder, bool isIgnoreExtension, bool isValidImageFormatExtension)
|
||||
|
Reference in New Issue
Block a user