MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / getActiveFolderPath

Function getActiveFolderPath

src/suggest/FileSuggestHelper.ts:81–90  ·  view source on GitHub ↗
(plugin: TaskNotesPlugin)

Source from the content-addressed store, hash-verified

79}
80
81export function getActiveFolderPath(plugin: TaskNotesPlugin): string | undefined {
82 const activeFile = plugin?.app?.workspace?.getActiveFile?.();
83 if (activeFile?.parent?.path !== undefined) {
84 return activeFile.parent.path;
85 }
86 if (typeof activeFile?.path === "string") {
87 return activeFile.path.split("/").slice(0, -1).join("/");
88 }
89 return undefined;
90}
91
92export function resolveIncludeFolders(
93 includeFolders: readonly string[],

Callers 2

getItemsMethod · 0.90
suggestFunction · 0.85

Calls 1

getActiveFileMethod · 0.80

Tested by

no test coverage detected