MCPcopy Create free account
hub / github.com/TanStack/cli / hasDirectory

Function hasDirectory

packages/create/src/edge-environment.ts:17–21  ·  view source on GitHub ↗
(files: Record<string, string>, path: string)

Source from the content-addressed store, hash-verified

15}
16
17function hasDirectory(files: Record<string, string>, path: string) {
18 const directory = normalizePath(path)
19 const prefix = directory.endsWith('/') ? directory : `${directory}/`
20 return Object.keys(files).some((file) => file.startsWith(prefix))
21}
22
23function createMissingDirectoryError(path: string) {
24 return new Error(`Directory not found: ${path}`)

Callers 1

createMemoryEnvironmentFunction · 0.85

Calls 1

normalizePathFunction · 0.70

Tested by

no test coverage detected