From b08a867d6016ccf04783a0f91fdbcc3460daf234 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 22 Mar 2019 03:44:26 +0100 Subject: benchmark,doc,lib: capitalize more comments PR-URL: https://github.com/nodejs/node/pull/26849 Reviewed-By: Rich Trott Reviewed-By: Vse Mozhet Byt --- lib/fs.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/fs.js') diff --git a/lib/fs.js b/lib/fs.js index 8aeaffb8ec..206ab1fcfe 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -121,7 +121,7 @@ function handleErrorFromBinding(ctx) { Error.captureStackTrace(err, handleErrorFromBinding); throw err; } - if (ctx.error !== undefined) { // errors created in C++ land. + if (ctx.error !== undefined) { // Errors created in C++ land. // TODO(joyeecheung): currently, ctx.error are encoding errors // usually caused by memory problems. We need to figure out proper error // code(s) for this. @@ -289,7 +289,7 @@ function readFile(path, options, callback) { if (!ReadFileContext) ReadFileContext = require('internal/fs/read_file_context'); const context = new ReadFileContext(callback, options.encoding); - context.isUserFd = isFd(path); // file descriptor ownership + context.isUserFd = isFd(path); // File descriptor ownership const req = new FSReqCallback(); req.context = context; @@ -349,14 +349,14 @@ function tryReadSync(fd, isUserFd, buffer, pos, len) { function readFileSync(path, options) { options = getOptions(options, { flag: 'r' }); - const isUserFd = isFd(path); // file descriptor ownership + const isUserFd = isFd(path); // File descriptor ownership const fd = isUserFd ? path : fs.openSync(path, options.flag, 0o666); const stats = tryStatSync(fd, isUserFd); const size = isFileType(stats, S_IFREG) ? stats[8] : 0; let pos = 0; - let buffer; // single buffer with file data - let buffers; // list for when size is unknown + let buffer; // Single buffer with file data + let buffers; // List for when size is unknown if (size === 0) { buffers = []; @@ -1242,7 +1242,7 @@ function writeFileSync(path, data, options) { options = getOptions(options, { encoding: 'utf8', mode: 0o666, flag: 'w' }); const flag = options.flag || 'w'; - const isUserFd = isFd(path); // file descriptor ownership + const isUserFd = isFd(path); // File descriptor ownership const fd = isUserFd ? path : fs.openSync(path, flag, options.mode); if (!isArrayBufferView(data)) { -- cgit v1.2.3