(plugin: TaskNotesPlugin)
| 79 | } |
| 80 | |
| 81 | export 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 | |
| 92 | export function resolveIncludeFolders( |
| 93 | includeFolders: readonly string[], |
no test coverage detected