mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
lib: removes unnecessary params
PR-URL: https://github.com/nodejs/node/pull/32694 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
This commit is contained in:
1 parent
203776fb71
commit
4076e043b8
2 files changed
+4
-4
No files matched your search
@@ -105,7 +105,7 @@ class Dir {
|
||||
);
|
||||
}
|
||||
|
||||
readSync(options) {
|
||||
readSync() {
|
||||
if (this[kDirClosed] === true) {
|
||||
throw new ERR_DIR_CLOSED();
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ function validateFileHandle(handle) {
|
||||
throw new ERR_INVALID_ARG_TYPE('filehandle', 'FileHandle', handle);
|
||||
}
|
||||
|
||||
async function writeFileHandle(filehandle, data, options) {
|
||||
async function writeFileHandle(filehandle, data) {
|
||||
let remaining = data.length;
|
||||
if (remaining === 0) return;
|
||||
do {
|
||||
@@ -514,10 +514,10 @@ async function writeFile(path, data, options) {
|
||||
}
|
||||
|
||||
if (path instanceof FileHandle)
|
||||
return writeFileHandle(path, data, options);
|
||||
return writeFileHandle(path, data);
|
||||
|
||||
const fd = await open(path, flag, options.mode);
|
||||
return writeFileHandle(fd, data, options).finally(fd.close);
|
||||
return writeFileHandle(fd, data).finally(fd.close);
|
||||
}
|
||||
|
||||
async function appendFile(path, data, options) {
|
||||
|
||||
Reference in new issue
Block a user