MCPcopy Index your code
hub / github.com/hey-api/hey-api / getFilePaths

Function getFilePaths

packages/openapi-python-tests/utils.ts:4–20  ·  view source on GitHub ↗
(dirPath: string)

Source from the content-addressed store, hash-verified

2import path from 'node:path';
3
4export const getFilePaths = (dirPath: string): Array<string> => {
5 let filePaths: Array<string> = [];
6 const files = fs.readdirSync(dirPath);
7
8 for (const file of files) {
9 const filePath = path.join(dirPath, file);
10 const stat = fs.statSync(filePath);
11
12 if (stat.isDirectory()) {
13 filePaths = filePaths.concat(getFilePaths(filePath));
14 } else {
15 filePaths.push(filePath);
16 }
17 }
18
19 return filePaths;
20};
21
22export const getSpecsPath = (): string => path.join(__dirname, '..', '..', 'specs');

Callers 2

opencode.test.tsFile · 0.90
opencode.test.tsFile · 0.90

Calls 2

joinMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected