summaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-03-07 01:03:53 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-10 00:44:40 +0100
commitf8763bb077db2f0be74e353c0b4f9e353c0fffa8 (patch)
treec73128074daa65d2e72e4d2a86a5b08059888144 /lib/fs.js
parent01a5300f3f4f788a043f6b5fe72e2b7b641dfb6c (diff)
downloadnode-new-f8763bb077db2f0be74e353c0b4f9e353c0fffa8.tar.gz
benchmark,doc,lib,test: capitalize comments
PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/fs.js b/lib/fs.js
index ccd1ff2756..46f26fe9eb 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -368,7 +368,7 @@ function readFileSync(path, options) {
} while (bytesRead !== 0 && pos < size);
} else {
do {
- // the kernel lies about many files.
+ // The kernel lies about many files.
// Go ahead and try to read some bytes.
buffer = Buffer.allocUnsafe(8192);
bytesRead = tryReadSync(fd, isUserFd, buffer, 0, 8192);
@@ -1445,7 +1445,7 @@ function realpathSync(p, options) {
const knownHard = Object.create(null);
const original = p;
- // current character position in p
+ // Current character position in p
let pos;
// The partial path so far, including a trailing slash if any
let current;
@@ -1512,7 +1512,7 @@ function realpathSync(p, options) {
continue;
}
- // read the link if it wasn't read before
+ // Read the link if it wasn't read before
// dev/ino always return 0 on windows, so skip the check.
let linkTarget = null;
let id;
@@ -1537,7 +1537,7 @@ function realpathSync(p, options) {
if (!isWindows) seenLinks[id] = linkTarget;
}
- // resolve the link, then start over
+ // Resolve the link, then start over
p = pathModule.resolve(resolvedLink, p.slice(pos));
// Skip over roots
@@ -1585,7 +1585,7 @@ function realpath(p, options, callback) {
const seenLinks = Object.create(null);
const knownHard = Object.create(null);
- // current character position in p
+ // Current character position in p
let pos;
// The partial path so far, including a trailing slash if any
let current;
@@ -1611,7 +1611,7 @@ function realpath(p, options, callback) {
// Walk down the path, swapping out linked path parts for their real
// values
function LOOP() {
- // stop if scanned past end of path
+ // Stop if scanned past end of path
if (pos >= p.length) {
return callback(null, encodeRealpathResult(p, options));
}
@@ -1651,9 +1651,9 @@ function realpath(p, options, callback) {
return process.nextTick(LOOP);
}
- // stat & read the link if not read before
- // call gotTarget as soon as the link target is known
- // dev/ino always return 0 on windows, so skip the check.
+ // Stat & read the link if not read before.
+ // Call `gotTarget()` as soon as the link target is known.
+ // `dev`/`ino` always return 0 on windows, so skip the check.
let id;
if (!isWindows) {
const dev = stats.dev.toString(32);
@@ -1680,7 +1680,7 @@ function realpath(p, options, callback) {
}
function gotResolvedLink(resolvedLink) {
- // resolve the link, then start over
+ // Resolve the link, then start over
p = pathModule.resolve(resolvedLink, p.slice(pos));
current = base = splitRoot(p);
pos = current.length;