@@ -92,7 +92,7 @@ function checkPathInDev(path: string) {
92
92
}
93
93
}
94
94
95
- function createAccessCache ( ) : Map < string , Array < number | Record < void > >> {
95
+ function createAccessMap ( ) : Map < string , Array < number | Record < void > >> {
96
96
return new Map ( ) ;
97
97
}
98
98
@@ -101,7 +101,7 @@ export function access(path: string, mode?: number): void {
101
101
if ( mode == null ) {
102
102
mode = 0 ; // fs.constants.F_OK
103
103
}
104
- const map = unstable_getCacheForType(createAccessCache );
104
+ const map = unstable_getCacheForType(createAccessMap );
105
105
let accessCache = map.get(path);
106
106
if (!accessCache) {
107
107
accessCache = [ ] ;
@@ -124,7 +124,7 @@ export function access(path: string, mode?: number): void {
124
124
readRecord(record); // No return value.
125
125
}
126
126
127
- function createLstatCache ( ) : Map < string , Array < boolean | Record < mixed > >> {
127
+ function createLstatMap ( ) : Map < string , Array < boolean | Record < mixed > >> {
128
128
return new Map ( ) ;
129
129
}
130
130
@@ -134,7 +134,7 @@ export function lstat(path: string, options?: {bigint?: boolean}): mixed {
134
134
if ( options && options . bigint ) {
135
135
bigint = true ;
136
136
}
137
- const map = unstable_getCacheForType ( createLstatCache ) ;
137
+ const map = unstable_getCacheForType ( createLstatMap ) ;
138
138
let lstatCache = map . get ( path ) ;
139
139
if ( ! lstatCache ) {
140
140
lstatCache = [ ] ;
@@ -158,7 +158,7 @@ export function lstat(path: string, options?: {bigint?: boolean}): mixed {
158
158
return stats ;
159
159
}
160
160
161
- function createReaddirCache (): Map<
161
+ function createReaddirMap (): Map<
162
162
string ,
163
163
Array < string | boolean | Record < mixed > > ,
164
164
> {
@@ -182,7 +182,7 @@ export function readdir(
182
182
withFileTypes = true ;
183
183
}
184
184
}
185
- const map = unstable_getCacheForType(createReaddirCache );
185
+ const map = unstable_getCacheForType(createReaddirMap );
186
186
let readdirCache = map.get(path);
187
187
if (!readdirCache) {
188
188
readdirCache = [ ] ;
@@ -207,7 +207,7 @@ export function readdir(
207
207
return files;
208
208
}
209
209
210
- function createReadFileCache ( ) : Map < string , Record < Buffer > > {
210
+ function createReadFileMap ( ) : Map < string , Record < Buffer > > {
211
211
return new Map ( ) ;
212
212
}
213
213
@@ -223,7 +223,7 @@ export function readFile(
223
223
} ,
224
224
): string | Buffer {
225
225
checkPathInDev ( path ) ;
226
- const map = unstable_getCacheForType ( createReadFileCache ) ;
226
+ const map = unstable_getCacheForType ( createReadFileMap ) ;
227
227
let record = map . get ( path ) ;
228
228
if ( ! record ) {
229
229
const thenable = fs . readFile ( path ) ;
@@ -264,7 +264,7 @@ export function readFile(
264
264
return text ;
265
265
}
266
266
267
- function createReadlinkCache (): Map< string , Array < string | Record < mixed > >> {
267
+ function createReadlinkMap (): Map< string , Array < string | Record < mixed > >> {
268
268
return new Map ( ) ;
269
269
}
270
270
@@ -281,7 +281,7 @@ export function readlink(
281
281
encoding = options . encoding ;
282
282
}
283
283
}
284
- const map = unstable_getCacheForType ( createReadlinkCache ) ;
284
+ const map = unstable_getCacheForType ( createReadlinkMap ) ;
285
285
let readlinkCache = map . get ( path ) ;
286
286
if ( ! readlinkCache ) {
287
287
readlinkCache = [ ] ;
@@ -305,7 +305,7 @@ export function readlink(
305
305
return linkString ;
306
306
}
307
307
308
- function createRealpathCache (): Map< string , Array < string | Record < mixed > >> {
308
+ function createRealpathMap (): Map< string , Array < string | Record < mixed > >> {
309
309
return new Map ( ) ;
310
310
}
311
311
@@ -322,7 +322,7 @@ export function realpath(
322
322
encoding = options . encoding ;
323
323
}
324
324
}
325
- const map = unstable_getCacheForType ( createRealpathCache ) ;
325
+ const map = unstable_getCacheForType ( createRealpathMap ) ;
326
326
let realpathCache = map . get ( path ) ;
327
327
if ( ! realpathCache ) {
328
328
realpathCache = [ ] ;
@@ -346,7 +346,7 @@ export function realpath(
346
346
return resolvedPath ;
347
347
}
348
348
349
- function createStatCache (): Map< string , Array < boolean | Record < mixed > >> {
349
+ function createStatMap (): Map< string , Array < boolean | Record < mixed > >> {
350
350
return new Map ( ) ;
351
351
}
352
352
@@ -356,7 +356,7 @@ export function stat(path: string, options?: {bigint?: boolean}): mixed {
356
356
if ( options && options . bigint ) {
357
357
bigint = true ;
358
358
}
359
- const map = unstable_getCacheForType ( createStatCache ) ;
359
+ const map = unstable_getCacheForType ( createStatMap ) ;
360
360
let statCache = map . get ( path ) ;
361
361
if ( ! statCache ) {
362
362
statCache = [ ] ;
0 commit comments