MCPcopy Create free account
hub / github.com/cloudflare/computer / lsFilesWith

Function lsFilesWith

packages/computer/src/git/reads.ts:365–380  ·  view source on GitHub ↗
(opts: LsFilesWithDeps)

Source from the content-addressed store, hash-verified

363}
364
365export async function lsFilesWith(opts: LsFilesWithDeps): Promise<string[]> {
366 const dir = opts.dir ?? "/";
367 try {
368 return await opts.git.listFiles({
369 fs: opts.fs,
370 dir,
371 ref: opts.ref,
372 cache: opts.cache,
373 });
374 } catch (cause) {
375 if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause });
376 throw new GitError("ELSFILESFAIL", `git ls-files failed: ${errorMessage(cause)}`, {
377 cause,
378 });
379 }
380}
381
382// ---------------------------------------------------------------
383// ls-tree

Callers 2

lsFilesFunction · 0.85
reads.test.tsFile · 0.85

Calls 3

isNotARepositoryCauseFunction · 0.85
errorMessageFunction · 0.70
listFilesMethod · 0.65

Tested by

no test coverage detected