diff --git a/src/utils/FileHelper.ts b/src/utils/FileHelper.ts index 3f50e61..31aec75 100644 --- a/src/utils/FileHelper.ts +++ b/src/utils/FileHelper.ts @@ -69,9 +69,10 @@ export class FileHelper { } } - createFileIfDoesNotExist(path: string) { - if (!fs.existsSync(path)) { - fs.openSync(path, 'w'); + createFileIfDoesNotExist(filePath: string) { + if (!fs.existsSync(filePath)) { + this.createFolderIfDoesNotExist(path.dirname(filePath)); + fs.openSync(filePath, 'w'); } }