MCPcopy Create free account
hub / github.com/agent-tower/core / assertDirectoryIsEmpty

Function assertDirectoryIsEmpty

packages/server/src/services/project.service.ts:99–106  ·  view source on GitHub ↗
(resolvedPath: string)

Source from the content-addressed store, hash-verified

97 );
98 }
99
100 const stat = fs.statSync(resolvedPath);
101 if (!stat.isDirectory()) {
102 throw new ValidationError(
103 `Project path is not a directory: ${resolvedPath}`
104 );
105 }
106}
107
108async function assertDirectoryIsEmpty(resolvedPath: string): Promise<void> {
109 const entries = await fsPromises.readdir(resolvedPath);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected