MCPcopy Create free account
hub / github.com/driangle/taskmd / isUnderTaskDir

Function isUnderTaskDir

apps/vscode/src/config.ts:94–102  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

92 * Check whether a file path falls under the resolved task directory.
93 */
94export function isUnderTaskDir(filePath: string): boolean {
95 const taskDir = resolveTaskDir(filePath);
96 if (!taskDir) return false;
97
98 const normalizedFile = path.resolve(filePath);
99 const normalizedTaskDir = path.resolve(taskDir);
100
101 return normalizedFile.startsWith(normalizedTaskDir + path.sep);
102}
103
104/** A task entry with its ID and title. */
105export interface TaskEntry {

Callers 2

config.test.tsFile · 0.90
isTaskFileFunction · 0.90

Calls 1

resolveTaskDirFunction · 0.70

Tested by

no test coverage detected