Skip to content

Commit 9f3ea0c

Browse files
committed
Add svg file check method
1 parent 86df1f1 commit 9f3ea0c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Files.Shared/Helpers/FileExtensionHelpers.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,16 @@ public static bool IsTextFile(string? fileExtensionToCheck)
386386
return HasExtension(fileExtensionToCheck, ".txt");
387387
}
388388

389+
/// <summary>
390+
/// Checks if the file extension represents an SVG file.
391+
/// </summary>
392+
/// <param name="fileExtensionToCheck">The file extension to check</param>
393+
/// <returns><c>true</c> if the <c>filePathToCheck</c> is an SVG file; otherwise, <c>false</c>.</returns>
394+
public static bool IsSvgFile(string? fileExtensionToCheck)
395+
{
396+
return HasExtension(fileExtensionToCheck, ".svg");
397+
}
398+
389399
/// <summary>
390400
/// Check if the file is signable.
391401
/// </summary>

0 commit comments

Comments
 (0)