Conversation
doc/api/fs.md
Outdated
| fs.accessSyc('etc/passwd', fs.constants.R_OK | fs.constants.W_OK); | ||
| console.log('can read/write'); | ||
| } catch (err) { | ||
| console.log('no access!'); |
There was a problem hiding this comment.
A nit: maybe console.error('no access!')?
doc/api/fs.md
Outdated
|
|
||
| try { | ||
| fd = fs.openSync('message.txt', 'a'); | ||
| fs.appendFile(fd, 'data to append', 'utf8'); |
There was a problem hiding this comment.
appendFile -> appendFileSync
doc/api/fs.md
Outdated
| An easier method of constructing the `mode` is to use a sequence of three | ||
| octal digits (e.g. `765`). The left-most digit (`7` in the example), specifies | ||
| the permissions for the file owner. The middle digit (`6` in the example), | ||
| specifies permissions for the group. The right most digit (`5` in the example), |
There was a problem hiding this comment.
right most -> right-most ?
doc/api/fs.md
Outdated
|
|
||
| ```js | ||
| try { | ||
| fs.accessSyc('etc/passwd', fs.constants.R_OK | fs.constants.W_OK); |
There was a problem hiding this comment.
accessSyc --> accessSync
doc/api/fs.md
Outdated
|
|
||
| Any specified file descriptor has to have been opened for appending. | ||
| The `file` may be specified as a numeric file descriptor that has been opened | ||
| for appending (using `fs.open()` or `fs.openSync()`. It is important to note |
There was a problem hiding this comment.
needs closing parenthesis after openSync()
There was a problem hiding this comment.
+ The same for fs.appendFileSync() note.
doc/api/fs.md
Outdated
|
|
||
| The `file` may be specified as a numeric file descriptor that has been opened | ||
| for appending (using `fs.open()` or `fs.openSync()`. It is important to note | ||
| that the file descriptor will not be closed automatically. |
There was a problem hiding this comment.
Suggestion: It is important to note that the file descriptor will not be closed automatically. -> The file descriptor will not be closed automatically.
doc/api/fs.md
Outdated
| Any specified file descriptor has to have been opened for appending. | ||
| The `file` may be specified as a numeric file descriptor that has been opened | ||
| for appending (using `fs.open()` or `fs.openSync()`. It is important to note | ||
| that the file descriptor will not be closed automatically. |
There was a problem hiding this comment.
Suggestion: It is important to note that the file descriptor will not be closed automatically. -> The file descriptor will not be closed automatically.
|
@jasnell CI seems failed: |
PR-URL: #17831 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
|
Landed in 286a5d0 |
PR-URL: #17831 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #17831 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #17831 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #17831 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Some fs doc improvements
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
doc