MCPcopy Create free account
hub / github.com/arctic-cli/interface / up

Function up

packages/arctic/src/util/filesystem.ts:29–42  ·  view source on GitHub ↗
(options: { targets: string[]; start: string; stop?: string })

Source from the content-addressed store, hash-verified

27 }
28
29 export async function* up(options: { targets: string[]; start: string; stop?: string }) {
30 const { targets, start, stop } = options
31 let current = start
32 while (true) {
33 for (const target of targets) {
34 const search = join(current, target)
35 if (await exists(search)) yield search
36 }
37 if (stop === current) break
38 const parent = dirname(current)
39 if (parent === current) break
40 current = parent
41 }
42 }
43
44 export async function globUp(pattern: string, start: string, stop?: string) {
45 let current = start

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected