checkExtension
Checks if the given path or file has the specified extension.
Import:
import { checkExtension } from 'obsidian-dev-utils/obsidian/file-system';Signature:
function checkExtension(pathOrFile: PathOrAbstractFile | null, extension: string): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
pathOrFile | PathOrAbstractFile | null | The path or abstract file to check. |
extension | string | The extension to compare against. |
Returns: boolean — Returns true if the path or file has the specified extension, false otherwise.