MCPcopy Index your code
hub / github.com/coderoad/coderoad-vscode / checkWorkspaceEmpty

Function checkWorkspaceEmpty

src/services/workspace/index.ts:13–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13export const checkWorkspaceEmpty = async () => {
14 let files
15 try {
16 files = await readDir(env.WORKSPACE_ROOT, { encoding: 'utf8' })
17 } catch (error) {
18 throw new Error('Failed to check workspace')
19 }
20 return files.length === 0
21}
22
23// capture the workspace root to use the users dirname in processes
24export const getWorkspaceRoot = (): string => {

Callers 1

onValidateSetupFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected