MCPcopy Index your code
hub / github.com/github/awesome-copilot / dirHasDockerfile

Function dirHasDockerfile

extensions/java-modernization-studio/scan.mjs:385–392  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

383const DOCKERFILE_RE = /^(dockerfile|containerfile)(\.[\w.-]+)?$/i;
384
385async function dirHasDockerfile(dir) {
386 try {
387 const entries = await readdir(dir, { withFileTypes: true });
388 return entries.some((e) => (e.isFile() || e.isSymbolicLink()) && DOCKERFILE_RE.test(e.name));
389 } catch {
390 return false;
391 }
392}
393
394async function findDockerfile(repoPath) {
395 // Case-insensitive, and also accept Containerfile (Podman) / Dockerfile.<tag>.

Callers 1

findDockerfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected