DataAdapter
โบ exists
DataAdapter.exists() method
Check if something exists at the given path. For a faster way to synchronously check if a note or attachment is in the vault, use Vault.getAbstractFileByPath().
Signature:
exists(normalizedPath: string, sensitive?: boolean): Promise<boolean>;
Parameters
Parameter | Type | Description |
---|---|---|
normalizedPath | string | path to file/folder, use normalizePath() to normalize beforehand. |
sensitive | boolean | (Optional) Some file systems/operating systems are case-insensitive, set to true to force a case-sensitivity check. |
Returns:
Promise<boolean>