feature: make directory in the path before screenshot
This commit is contained in:
parent
39c580a9b1
commit
d2e6c97d45
|
|
@ -189,6 +189,7 @@ export async function readFileAsync(file: string, encoding: string): Promise<str
|
|||
|
||||
export async function writeFileAsync(file: string, data: any) {
|
||||
assertFileAccess();
|
||||
await nodeFS.mkdirSync(nodePath.dirname(file), {recursive: true});
|
||||
return await promisify(nodeFS.writeFile)(file, data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue