MCPcopy Create free account
hub / github.com/anus-dev/ANUS / addDirectory

Method addDirectory

packages/core/src/utils/workspaceContext.ts:67–74  ·  view source on GitHub ↗

* Adds a directory to the workspace. * @param directory The directory path to add (can be relative or absolute) * @param basePath Optional base path for resolving relative paths (defaults to cwd)

(directory: string, basePath: string = process.cwd())

Source from the content-addressed store, hash-verified

65 * @param basePath Optional base path for resolving relative paths (defaults to cwd)
66 */
67 addDirectory(directory: string, basePath: string = process.cwd()): void {
68 const resolved = this.resolveAndValidateDir(directory, basePath);
69 if (this.directories.has(resolved)) {
70 return;
71 }
72 this.directories.add(resolved);
73 this.notifyDirectoriesChanged();
74 }
75
76 private resolveAndValidateDir(
77 directory: string,

Callers 3

constructorMethod · 0.95

Calls 3

resolveAndValidateDirMethod · 0.95
addMethod · 0.80

Tested by

no test coverage detected