Skip to content

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.

Import:

import { getObsidianUserDataFolderCandidates } from '@mnaoumov/obsidian-dev-toolkit/obsidian-vault-registry';

Signature:

function getObsidianUserDataFolderCandidates(): readonly string[]

Returns: readonly string[] — The candidate folders.


Links to this page: