We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11aea01 commit fa0cac5Copy full SHA for fa0cac5
lib/fs.js
@@ -44,7 +44,6 @@ const {
44
const util = require('util');
45
const pathModule = require('path');
46
const { isUint8Array } = require('internal/util/types');
47
-const { createPromise, promiseResolve } = process.binding('util');
48
49
const binding = process.binding('fs');
50
const fs = exports;
@@ -250,6 +249,7 @@ fs.exists = function(path, callback) {
250
249
251
Object.defineProperty(fs.exists, internalUtil.promisify.custom, {
252
value: (path) => {
+ const { createPromise, promiseResolve } = process.binding('util');
253
const promise = createPromise();
254
fs.exists(path, (exists) => promiseResolve(promise, exists));
255
return promise;
0 commit comments