src/AnvilPacker/Util/Utils.cs
/// <summary> Checks if the file path has the specified extension. </summary>
/// <param name="extension">The extension to check for; must start with a period. </param>
Checks if the file path has the specified extension.
Checks if the file path has the specified extension .
public static bool FileHasExtension(string path, string extension)
        {
            var actualExt = Path.GetExtension(path.AsSpan());
            return actualExt.Equals(extension, StringComparison.OrdinalIgnoreCase);
        }
public static bool FileHasExtension ( string path , string extension ) { var actualExt = Path . GetExtension ( path . AsSpan ( ) ) ; return actualExt . Equals ( extension , StringComparison . OrdinalIgnoreCase ) ; }
Checks if the file path has the specified extension.
Checks if the file path has the specified extension .
path
string
extension
string
The extension to check for; must start with a period.
The extension to check for ; must start with a period .