(folderPath: string, filePath: string, content: string)
| 9 | * @param content - The content to write to the file |
| 10 | */ |
| 11 | export const writeFile = (folderPath: string, filePath: string, content: string) => { |
| 12 | if (!folderPath || !filePath || !content) { |
| 13 | return; |
| 14 | } |
| 15 | if (!fs.existsSync(folderPath)) { |
| 16 | fs.mkdirSync(folderPath, { recursive: true }); |
| 17 | } |
| 18 | fs.writeFileSync(path.join(folderPath, filePath), content); |
| 19 | }; |
| 20 | |
| 21 | /** |
| 22 | * Create multiple files from parsed data |
no outgoing calls
no test coverage detected