Skip to content

Commit 6816414

Browse files
evanlucasMylesBorins
authored andcommitted
doc: improve fs api descriptions
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 722640f commit 6816414

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

doc/api/fs.md

+27-9
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,10 @@ added: v0.1.30
510510
* `callback` {Function}
511511
* `err` {Error}
512512

513-
Asynchronous chmod(2). No arguments other than a possible exception are given
514-
to the completion callback.
513+
Asynchronously changes the permissions of a file. No arguments other than a
514+
possible exception are given to the completion callback.
515+
516+
See also: chmod(2)
515517

516518
## fs.chmodSync(path, mode)
517519
<!-- YAML
@@ -521,7 +523,10 @@ added: v0.6.7
521523
* `path` {string|Buffer}
522524
* `mode` {integer}
523525

524-
Synchronous chmod(2). Returns `undefined`.
526+
Synchronously changes the permissions of a file. Returns `undefined`.
527+
This is the synchronous version of [`fs.chmod()`][].
528+
529+
See also: chmod(2)
525530

526531
## fs.chown(path, uid, gid, callback)
527532
<!-- YAML
@@ -534,8 +539,10 @@ added: v0.1.97
534539
* `callback` {Function}
535540
* `err` {Error}
536541

537-
Asynchronous chown(2). No arguments other than a possible exception are given
538-
to the completion callback.
542+
Asynchronously changes owner and group of a file. No arguments other than a
543+
possible exception are given to the completion callback.
544+
545+
See also: chown(2)
539546

540547
## fs.chownSync(path, uid, gid)
541548
<!-- YAML
@@ -546,7 +553,10 @@ added: v0.1.97
546553
* `uid` {integer}
547554
* `gid` {integer}
548555

549-
Synchronous chown(2). Returns `undefined`.
556+
Synchronously changes owner and group of a file. Returns `undefined`.
557+
This is the synchronous version of [`fs.chown()`][].
558+
559+
See also: chown(2)
550560

551561
## fs.close(fd, callback)
552562
<!-- YAML
@@ -1118,8 +1128,10 @@ added: v0.1.8
11181128
* `callback` {Function}
11191129
* `err` {Error}
11201130

1121-
Asynchronous mkdir(2). No arguments other than a possible exception are given
1122-
to the completion callback. `mode` defaults to `0o777`.
1131+
Asynchronously creates a directory. No arguments other than a possible exception
1132+
are given to the completion callback. `mode` defaults to `0o777`.
1133+
1134+
See also: mkdir(2)
11231135

11241136
## fs.mkdirSync(path[, mode])
11251137
<!-- YAML
@@ -1129,7 +1141,10 @@ added: v0.1.21
11291141
* `path` {string|Buffer}
11301142
* `mode` {integer}
11311143

1132-
Synchronous mkdir(2). Returns `undefined`.
1144+
Synchronously creates a directory. Returns `undefined`.
1145+
This is the synchronous version of [`fs.mkdir()`][].
1146+
1147+
See also: mkdir(2)
11331148

11341149
## fs.mkdtemp(prefix[, options], callback)
11351150
<!-- YAML
@@ -2316,11 +2331,14 @@ The following constants are meant for use with the [`fs.Stats`][] object's
23162331
[Caveats]: #fs_caveats
23172332
[`fs.access()`]: #fs_fs_access_path_mode_callback
23182333
[`fs.appendFile()`]: fs.html#fs_fs_appendfile_file_data_options_callback
2334+
[`fs.chmod()`]: #fs_fs_chmod_path_mode_callback
2335+
[`fs.chown()`]: #fs_fs_chown_path_uid_gid_callback
23192336
[`fs.exists()`]: fs.html#fs_fs_exists_path_callback
23202337
[`fs.fstat()`]: #fs_fs_fstat_fd_callback
23212338
[`fs.FSWatcher`]: #fs_class_fs_fswatcher
23222339
[`fs.futimes()`]: #fs_fs_futimes_fd_atime_mtime_callback
23232340
[`fs.lstat()`]: #fs_fs_lstat_path_callback
2341+
[`fs.mkdir()`]: #fs_fs_mkdir_path_mode_callback
23242342
[`fs.mkdtemp()`]: #fs_fs_mkdtemp_prefix_options_callback
23252343
[`fs.open()`]: #fs_fs_open_path_flags_mode_callback
23262344
[`fs.read()`]: #fs_fs_read_fd_buffer_offset_length_position_callback

0 commit comments

Comments
 (0)