({ files, filePath }: { files: FileInfo[]; filePath: string })
| 22 | * Create multiple files from parsed data |
| 23 | */ |
| 24 | export function createFiles({ files, filePath }: { files: FileInfo[]; filePath: string }): void { |
| 25 | try { |
| 26 | for (const file of files) { |
| 27 | const dirPath = path.dirname(filePath); |
| 28 | writeFile(dirPath, file.filename, file.content); |
| 29 | } |
| 30 | } catch (error) { |
| 31 | logger.printErrorLog(`Failed to create files in ${filePath}: ${(error as Error).message}`); |
| 32 | throw error; |
| 33 | } |
| 34 | } |
no test coverage detected