Skip to content

Commit 5df426f

Browse files
committed
fs: move fs.promises API to fs/promises
1 parent fab7afe commit 5df426f

File tree

8 files changed

+582
-530
lines changed

8 files changed

+582
-530
lines changed

benchmark/fs/bench-stat-promise.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const common = require('../common');
4-
const fs = require('fs');
4+
const fsPromises = require('fs/promises');
55

66
const bench = common.createBenchmark(main, {
77
n: [20e4],
@@ -10,11 +10,11 @@ const bench = common.createBenchmark(main, {
1010

1111
async function run(n, statType) {
1212
const arg = statType === 'fstat' ?
13-
await fs.promises.open(__filename, 'r') : __filename;
13+
await fsPromises.open(__filename, 'r') : __filename;
1414
let remaining = n;
1515
bench.start();
1616
while (remaining-- > 0)
17-
await fs.promises[statType](arg);
17+
await fsPromises[statType](arg);
1818
bench.end(n);
1919

2020
if (typeof arg.close === 'function')

0 commit comments

Comments
 (0)