|
@@ -45,5 +45,11 @@ bool FileSystemPath::canonicalize(bool resolve_symbolic_links)
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+bool FileSystemPath::has_extension(StringView extension) const
|
|
|
+{
|
|
|
+ // FIXME: This is inefficient, expand StringView with enough functionality that we don't need to copy strings here.
|
|
|
+ String extension_string = extension;
|
|
|
+ return m_string.to_lowercase().ends_with(extension_string.to_lowercase());
|
|
|
}
|
|
|
|
|
|
+}
|