(_dirPath)
| 190 | } |
| 191 | |
| 192 | export function parseDirectory(_dirPath) { |
| 193 | const filePaths = recursiveDirectorySearch(_dirPath); |
| 194 | let structs = []; |
| 195 | for (let filePath of filePaths) { |
| 196 | const data = fs.readFileSync(filePath, 'utf8'); |
| 197 | try { |
| 198 | const _structs = parseFile(data); |
| 199 | if (_structs.length) { |
| 200 | const relativePath = filePath.replace(_dirPath, ''); |
| 201 | structs = structs.concat(_structs.map(x => ({...x, fromFile: relativePath}))) |
| 202 | } |
| 203 | } catch(err) { |
| 204 | console.log(`Caught error parsing ${filePath}`) |
| 205 | throw err; |
| 206 | } |
| 207 | } |
| 208 | return structs; |
| 209 | } |
nothing calls this directly
no test coverage detected