diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index 33260474ea2f10..e9a82ab64b16bf 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -507,7 +507,7 @@ async function readFileHandle(filehandle, options) { const statFields = await PromisePrototypeThen( binding.fstat(filehandle.fd, false, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); checkAborted(signal); @@ -542,7 +542,7 @@ async function readFileHandle(filehandle, options) { const bytesRead = (await PromisePrototypeThen( binding.read(filehandle.fd, buffer, offset, length, -1, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) ?? 0; totalRead += bytesRead; @@ -594,7 +594,7 @@ async function access(path, mode = F_OK) { return await PromisePrototypeThen( binding.access(pathModule.toNamespacedPath(path), mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -615,7 +615,7 @@ async function copyFile(src, dest, mode) { mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -627,9 +627,9 @@ async function open(path, flags, mode) { mode = parseFileMode(mode, 'mode', 0o666); return new FileHandle(await PromisePrototypeThen( binding.openFileHandle(pathModule.toNamespacedPath(path), - flagsNumber, mode, kUsePromises), + flagsNumber, mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )); } @@ -686,7 +686,7 @@ async function read(handle, bufferOrParams, offset, length, position) { const bytesRead = (await PromisePrototypeThen( binding.read(handle.fd, buffer, offset, length, position, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesRead, buffer }; @@ -701,7 +701,7 @@ async function readv(handle, buffers, position) { const bytesRead = (await PromisePrototypeThen( binding.readBuffers(handle.fd, buffers, position, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesRead, buffers }; } @@ -735,7 +735,7 @@ async function write(handle, buffer, offsetOrOptions, length, position) { binding.writeBuffer(handle.fd, buffer, offset, length, position, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesWritten, buffer }; } @@ -745,7 +745,7 @@ async function write(handle, buffer, offsetOrOptions, length, position) { const bytesWritten = (await PromisePrototypeThen( binding.writeString(handle.fd, buffer, offset, length, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesWritten, buffer }; } @@ -763,7 +763,7 @@ async function writev(handle, buffers, position) { const bytesWritten = (await PromisePrototypeThen( binding.writeBuffers(handle.fd, buffers, position, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesWritten, buffers }; } @@ -776,7 +776,7 @@ async function rename(oldPath, newPath) { pathModule.toNamespacedPath(newPath), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -791,7 +791,7 @@ async function ftruncate(handle, len = 0) { return await PromisePrototypeThen( binding.ftruncate(handle.fd, len, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -816,7 +816,7 @@ async function rmdir(path, options) { return await PromisePrototypeThen( binding.rmdir(path, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -824,7 +824,7 @@ async function fdatasync(handle) { return await PromisePrototypeThen( binding.fdatasync(handle.fd, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -832,7 +832,7 @@ async function fsync(handle) { return await PromisePrototypeThen( binding.fsync(handle.fd, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -852,7 +852,7 @@ async function mkdir(path, options) { parseFileMode(mode, 'mode', 0o777), recursive, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -869,7 +869,7 @@ async function readdirRecursive(originalPath, options) { kUsePromises, ), undefined, - handleErrorFromBinding + handleErrorFromBinding, ), ], ]; @@ -893,7 +893,7 @@ async function readdirRecursive(originalPath, options) { kUsePromises, ), undefined, - handleErrorFromBinding + handleErrorFromBinding, ), ]); } @@ -920,7 +920,7 @@ async function readdirRecursive(originalPath, options) { kUsePromises, ), undefined, - handleErrorFromBinding + handleErrorFromBinding, ), ]); } @@ -945,7 +945,7 @@ async function readdir(path, options) { kUsePromises, ), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return options.withFileTypes ? getDirectoryEntriesPromise(path, result) : @@ -959,7 +959,7 @@ async function readlink(path, options) { binding.readlink(pathModule.toNamespacedPath(path), options.encoding, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -982,7 +982,7 @@ async function symlink(target, path, type_) { stringToSymlinkType(type), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -990,7 +990,7 @@ async function fstat(handle, options = { bigint: false }) { const result = await PromisePrototypeThen( binding.fstat(handle.fd, options.bigint, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return getStatsFromBinding(result); } @@ -1001,7 +1001,7 @@ async function lstat(path, options = { bigint: false }) { binding.lstat(pathModule.toNamespacedPath(path), options.bigint, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return getStatsFromBinding(result); } @@ -1012,7 +1012,7 @@ async function stat(path, options = { bigint: false }) { binding.stat(pathModule.toNamespacedPath(path), options.bigint, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return getStatsFromBinding(result); } @@ -1023,7 +1023,7 @@ async function statfs(path, options = { bigint: false }) { binding.statfs(pathModule.toNamespacedPath(path), options.bigint, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return getStatFsFromBinding(result); } @@ -1036,7 +1036,7 @@ async function link(existingPath, newPath) { pathModule.toNamespacedPath(newPath), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1045,7 +1045,7 @@ async function unlink(path) { return await PromisePrototypeThen( binding.unlink(pathModule.toNamespacedPath(path), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1054,7 +1054,7 @@ async function fchmod(handle, mode) { return await PromisePrototypeThen( binding.fchmod(handle.fd, mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1064,7 +1064,7 @@ async function chmod(path, mode) { return await PromisePrototypeThen( binding.chmod(pathModule.toNamespacedPath(path), mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1083,7 +1083,7 @@ async function lchown(path, uid, gid) { return await PromisePrototypeThen( binding.lchown(pathModule.toNamespacedPath(path), uid, gid, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1093,7 +1093,7 @@ async function fchown(handle, uid, gid) { return await PromisePrototypeThen( binding.fchown(handle.fd, uid, gid, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1104,7 +1104,7 @@ async function chown(path, uid, gid) { return await PromisePrototypeThen( binding.chown(pathModule.toNamespacedPath(path), uid, gid, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1116,7 +1116,7 @@ async function utimes(path, atime, mtime) { toUnixTimestamp(mtime), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1126,7 +1126,7 @@ async function futimes(handle, atime, mtime) { return await PromisePrototypeThen( binding.futimes(handle.fd, atime, mtime, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1138,7 +1138,7 @@ async function lutimes(path, atime, mtime) { toUnixTimestamp(mtime), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1148,7 +1148,7 @@ async function realpath(path, options) { return await PromisePrototypeThen( binding.realpath(path, options.encoding, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1168,7 +1168,7 @@ async function mkdtemp(prefix, options) { return await PromisePrototypeThen( binding.mkdtemp(path, options.encoding, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); }