Reads the vaults the desktop Obsidian of this machine knows, from its obsidian.json. A development build uses it to find the vault it deploys into when OBSIDIAN_CONFIG_FOLDER is not set, and to name the candidates when it cannot choose one.
Re-implemented after packages/obsidian-utils/src/vault.ts of obsidian-tools (MIT).
| Function |
Description |
| formatObsidianVaultList |
Formats a vault list for an error or warning message, one vault per line, the open ones marked. |
| getObsidianUserDataFolderCandidates |
Lists the folders the desktop Obsidian may keep its user data, obsidian.json included, in, most likely first: the obsidian folder in %APPDATA% on Windows, ~/Library/Application Support/obsidian on macOS, and on Linux $XDG_CONFIG_HOME/obsidian (or ~/.config/obsidian), then the Flatpak and Snap locations. |
| readObsidianVaultRegistry |
Reads the vaults Obsidian knows, most recently opened first. |