summaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-03-22 03:44:26 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-27 17:20:06 +0100
commitb08a867d6016ccf04783a0f91fdbcc3460daf234 (patch)
tree5df4b30220cde5ae5eac9ed956c9badac6ba08af /lib/fs.js
parentfd992e6e36bb4b01a6ceb71cfeb3bae640b492a6 (diff)
downloadandroid-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.tar.gz
android-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.tar.bz2
android-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.zip
benchmark,doc,lib: capitalize more comments
PR-URL: https://github.com/nodejs/node/pull/26849 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js12
1 files changed, 6 insertions, 6 deletions
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)) {