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

ParameterTypeDescription
normalizedPathstringpath to file/folder, use normalizePath() to normalize beforehand.
sensitiveboolean(Optional) Some file systems/operating systems are case-insensitive, set to true to force a case-sensitivity check.

Returns:

Promise<boolean>