MCPcopy Create free account
hub / github.com/vercel/vercel / getSubdirectories

Function getSubdirectories

packages/python/src/entrypoint.ts:359–371  ·  view source on GitHub ↗

* List immediate subdirectories of workPath (non-hidden).

(workPath: string)

Source from the content-addressed store, hash-verified

357 * List immediate subdirectories of workPath (non-hidden).
358 */
359async function getSubdirectories(workPath: string): Promise<string[]> {
360 try {
361 const entries = await fs.promises.readdir(workPath, {
362 withFileTypes: true,
363 });
364 return entries
365 .filter(e => e.isDirectory() && !e.name.startsWith('.'))
366 .map(e => e.name)
367 .sort();
368 } catch {
369 return [];
370 }
371}
372
373function makeDiagnosticError(
374 framework: string,

Callers 1

Calls 3

sortMethod · 0.80
filterMethod · 0.80
isDirectoryMethod · 0.45

Tested by

no test coverage detected