getFolderNoteFolder
Finds the folder a file is the folder note of — the inverse of resolveFolderNote.
The answer is checked through resolveFolderNote itself, so the two can never disagree: a file is a folder’s note exactly when resolving that folder’s note yields this very file. A file that does not exist in the vault (one built for a path with nothing at it) is never a folder note.
Import:
import { getFolderNoteFolder } from '@mnaoumov/obsidian-lib/folder-note';Signature:
function getFolderNoteFolder(params: GetFolderNoteFolderParams): TFolder | nullParameters:
| Parameter | Type | Description |
|---|---|---|
params |
GetFolderNoteFolderParams | The file, and optionally the setup to resolve it with. |
Returns: TFolder | null — The folder, or null when the file is not a folder note.
Links to this page: