MCPcopy Index your code
hub / github.com/github/docs / walkFiles

Function walkFiles

script/content-migrations/use-short-versions.js:14–19  ·  view source on GitHub ↗
(pathToWalk, ext)

Source from the content-addressed store, hash-verified

12const dryRun = ['-d', '--dry-run'].includes(process.argv[2])
13
14const walkFiles = (pathToWalk, ext) => {
15 return walk(path.posix.join(process.cwd(), pathToWalk), {
16 includeBasePath: true,
17 directories: false,
18 }).filter((file) => file.endsWith(ext) && !file.endsWith('README.md'))
19}
20
21const markdownFiles = walkFiles('content', '.md').concat(walkFiles('data', '.md'))
22const yamlFiles = walkFiles('data', '.yml')

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected