MCPcopy
hub / github.com/callumalpass/tasknotes / getPluginDataPath

Function getPluginDataPath

src/settings/settingsPersistence.ts:50–58  ·  view source on GitHub ↗
(host: SettingsDataHost)

Source from the content-addressed store, hash-verified

48}
49
50export function getPluginDataPath(host: SettingsDataHost): string | null {
51 const pluginDir =
52 host.manifest.dir ??
53 (host.app.vault.configDir && host.manifest.id
54 ? `${host.app.vault.configDir}/plugins/${host.manifest.id}`
55 : undefined);
56
57 return pluginDir ? normalizePath(`${pluginDir}/data.json`) : null;
58}
59
60export async function pluginDataFileExists(host: SettingsDataHost): Promise<boolean> {
61 const dataPath = getPluginDataPath(host);

Callers 2

pluginDataFileExistsFunction · 0.85

Calls 1

normalizePathFunction · 0.90

Tested by

no test coverage detected