* 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())
| 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, |
no test coverage detected