Skip to content

getDemoVaultFolderName

The name of the demo vault’s own folder — the archive’s single top-level entry, and the folder the opener extracts it to.

One name serves both because they are the same folder seen twice: a user who unzips the archive by hand gets a self-describing, version-distinct folder rather than an anonymous one, and a user who runs the Open demo vault command sees that same name in Obsidian’s vault switcher.

Import:

import { getDemoVaultFolderName } from 'obsidian-dev-utils/obsidian/demo-vault-naming';

Signature:

function getDemoVaultFolderName(params: GetDemoVaultFolderNameParams): string

Parameters:

ParameterTypeDescription
paramsGetDemoVaultFolderNameParamsThe GetDemoVaultFolderNameParams.

Returns: string — The folder name, e.g. my-plugin-demo-vault-1.2.3.


Links to this page: