Commit e347ed8 1 parent 5df4cd1 commit e347ed8 Copy full SHA for e347ed8
File tree 1 file changed +5
-5
lines changed
packages/preload/src/modules
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import fs from 'fs/promises' ;
2
- import path from 'path' ;
2
+ import nodePath from 'path' ;
3
3
4
4
type WriteFileData = Parameters < typeof fs . writeFile > [ 1 ] ;
5
5
type WriteFileOptions = Parameters < typeof fs . writeFile > [ 2 ] ;
6
6
7
7
export async function resolve ( ...paths : string [ ] ) {
8
- return path . resolve ( ...paths ) ;
8
+ return nodePath . resolve ( ...paths ) ;
9
9
}
10
10
11
11
export async function readFile ( path : string ) {
12
12
return fs . readFile ( path ) ;
13
13
}
14
14
15
15
export async function writeFile (
16
- scenePath : string ,
16
+ path : string ,
17
17
content : WriteFileData ,
18
18
options ?: WriteFileOptions ,
19
19
) {
20
- await fs . mkdir ( path . dirname ( scenePath ) , { recursive : true } ) ;
21
- await fs . writeFile ( scenePath , content , options ) ;
20
+ await fs . mkdir ( nodePath . dirname ( path ) , { recursive : true } ) ;
21
+ await fs . writeFile ( path , content , options ) ;
22
22
}
23
23
24
24
export async function exists ( path : string ) {
You can’t perform that action at this time.
0 commit comments