Skip to content

Commit ac8a75d

Browse files
evanlucasgibfahn
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 b35ecb1 commit ac8a75d

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
@@ -669,8 +669,10 @@ changes:
669669
* `callback` {Function}
670670
* `err` {Error}
671671

672-
Asynchronous chmod(2). No arguments other than a possible exception are given
673-
to the completion callback.
672+
Asynchronously changes the permissions of a file. No arguments other than a
673+
possible exception are given to the completion callback.
674+
675+
See also: chmod(2)
674676

675677
## fs.chmodSync(path, mode)
676678
<!-- YAML
@@ -685,7 +687,10 @@ changes:
685687
* `path` {string|Buffer|URL}
686688
* `mode` {integer}
687689

688-
Synchronous chmod(2). Returns `undefined`.
690+
Synchronously changes the permissions of a file. Returns `undefined`.
691+
This is the synchronous version of [`fs.chmod()`][].
692+
693+
See also: chmod(2)
689694

690695
## fs.chown(path, uid, gid, callback)
691696
<!-- YAML
@@ -707,8 +712,10 @@ changes:
707712
* `callback` {Function}
708713
* `err` {Error}
709714

710-
Asynchronous chown(2). No arguments other than a possible exception are given
711-
to the completion callback.
715+
Asynchronously changes owner and group of a file. No arguments other than a
716+
possible exception are given to the completion callback.
717+
718+
See also: chown(2)
712719

713720
## fs.chownSync(path, uid, gid)
714721
<!-- YAML
@@ -724,7 +731,10 @@ changes:
724731
* `uid` {integer}
725732
* `gid` {integer}
726733

727-
Synchronous chown(2). Returns `undefined`.
734+
Synchronously changes owner and group of a file. Returns `undefined`.
735+
This is the synchronous version of [`fs.chown()`][].
736+
737+
See also: chown(2)
728738

729739
## fs.close(fd, callback)
730740
<!-- YAML
@@ -1511,8 +1521,10 @@ changes:
15111521
* `callback` {Function}
15121522
* `err` {Error}
15131523

1514-
Asynchronous mkdir(2). No arguments other than a possible exception are given
1515-
to the completion callback. `mode` defaults to `0o777`.
1524+
Asynchronously creates a directory. No arguments other than a possible exception
1525+
are given to the completion callback. `mode` defaults to `0o777`.
1526+
1527+
See also: mkdir(2)
15161528

15171529
## fs.mkdirSync(path[, mode])
15181530
<!-- YAML
@@ -1527,7 +1539,10 @@ changes:
15271539
* `path` {string|Buffer|URL}
15281540
* `mode` {integer} **Default:** `0o777`
15291541

1530-
Synchronous mkdir(2). Returns `undefined`.
1542+
Synchronously creates a directory. Returns `undefined`.
1543+
This is the synchronous version of [`fs.mkdir()`][].
1544+
1545+
See also: mkdir(2)
15311546

15321547
## fs.mkdtemp(prefix[, options], callback)
15331548
<!-- YAML
@@ -3026,10 +3041,13 @@ The following constants are meant for use with the [`fs.Stats`][] object's
30263041
[`fs.Stats`]: #fs_class_fs_stats
30273042
[`fs.access()`]: #fs_fs_access_path_mode_callback
30283043
[`fs.appendFile()`]: fs.html#fs_fs_appendfile_file_data_options_callback
3044+
[`fs.chmod()`]: #fs_fs_chmod_path_mode_callback
3045+
[`fs.chown()`]: #fs_fs_chown_path_uid_gid_callback
30293046
[`fs.exists()`]: fs.html#fs_fs_exists_path_callback
30303047
[`fs.fstat()`]: #fs_fs_fstat_fd_callback
30313048
[`fs.futimes()`]: #fs_fs_futimes_fd_atime_mtime_callback
30323049
[`fs.lstat()`]: #fs_fs_lstat_path_callback
3050+
[`fs.mkdir()`]: #fs_fs_mkdir_path_mode_callback
30333051
[`fs.mkdtemp()`]: #fs_fs_mkdtemp_prefix_options_callback
30343052
[`fs.open()`]: #fs_fs_open_path_flags_mode_callback
30353053
[`fs.read()`]: #fs_fs_read_fd_buffer_offset_length_position_callback

0 commit comments

Comments
 (0)