| 176 | } |
| 177 | |
| 178 | export function recursiveDirectorySearch(_dirPath) { |
| 179 | const files = fs.readdirSync(_dirPath).map(name => path.join(_dirPath, name)); |
| 180 | let filePaths = []; |
| 181 | for (let fileName of files) { |
| 182 | if (!fileName.includes('.')) { |
| 183 | const subFiles = recursiveDirectorySearch(fileName); |
| 184 | filePaths = filePaths.concat(subFiles); |
| 185 | } else if (fileName.includes('.sol')) { |
| 186 | filePaths.push(fileName); |
| 187 | } |
| 188 | } |
| 189 | return filePaths; |
| 190 | } |
| 191 | |
| 192 | export function parseDirectory(_dirPath) { |
| 193 | const filePaths = recursiveDirectorySearch(_dirPath); |