MCPcopy Create free account
hub / github.com/RioArisk/claudecode_api_RemoteControl / assertDirectoryPath

Function assertDirectoryPath

lib/transcript.js:483–493  ·  view source on GitHub ↗
(target)

Source from the content-addressed store, hash-verified

481}
482
483function assertDirectoryPath(target) {
484 const resolved = path.resolve(String(target || ''));
485 let stat;
486 try {
487 stat = fs.statSync(resolved);
488 } catch {
489 throw new Error('Directory not found');
490 }
491 if (!stat.isDirectory()) throw new Error('Path is not a directory');
492 return resolved;
493}
494
495function listDirectories(target) {
496 const cwd = assertDirectoryPath(target);

Callers 2

listDirectoriesFunction · 0.85
setupWebSocketServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected