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:
Jesus Hernandez authored and himself65 committed 2020-04-10 16:47:21 +08:00
1 parent 203776fb71
commit 4076e043b8
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -105,7 +105,7 @@ class Dir {
);
}
readSync(options) {
readSync() {
if (this[kDirClosed] === true) {
throw new ERR_DIR_CLOSED();
}
+3 -3
View File
@@ -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) {