Skip to content

Commit 541801d

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 8609a3f commit 541801d

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
@@ -891,8 +891,10 @@ changes:
891891
* `callback` {Function}
892892
* `err` {Error}
893893

894-
Asynchronous chmod(2). No arguments other than a possible exception are given
895-
to the completion callback.
894+
Asynchronously changes the permissions of a file. No arguments other than a
895+
possible exception are given to the completion callback.
896+
897+
See also: chmod(2)
896898

897899
## fs.chmodSync(path, mode)
898900
<!-- YAML
@@ -907,7 +909,10 @@ changes:
907909
* `path` {string|Buffer|URL}
908910
* `mode` {integer}
909911

910-
Synchronous chmod(2). Returns `undefined`.
912+
Synchronously changes the permissions of a file. Returns `undefined`.
913+
This is the synchronous version of [`fs.chmod()`][].
914+
915+
See also: chmod(2)
911916

912917
## fs.chown(path, uid, gid, callback)
913918
<!-- YAML
@@ -929,8 +934,10 @@ changes:
929934
* `callback` {Function}
930935
* `err` {Error}
931936

932-
Asynchronous chown(2). No arguments other than a possible exception are given
933-
to the completion callback.
937+
Asynchronously changes owner and group of a file. No arguments other than a
938+
possible exception are given to the completion callback.
939+
940+
See also: chown(2)
934941

935942
## fs.chownSync(path, uid, gid)
936943
<!-- YAML
@@ -946,7 +953,10 @@ changes:
946953
* `uid` {integer}
947954
* `gid` {integer}
948955

949-
Synchronous chown(2). Returns `undefined`.
956+
Synchronously changes owner and group of a file. Returns `undefined`.
957+
This is the synchronous version of [`fs.chown()`][].
958+
959+
See also: chown(2)
950960

951961
## fs.close(fd, callback)
952962
<!-- YAML
@@ -1733,8 +1743,10 @@ changes:
17331743
* `callback` {Function}
17341744
* `err` {Error}
17351745

1736-
Asynchronous mkdir(2). No arguments other than a possible exception are given
1737-
to the completion callback. `mode` defaults to `0o777`.
1746+
Asynchronously creates a directory. No arguments other than a possible exception
1747+
are given to the completion callback. `mode` defaults to `0o777`.
1748+
1749+
See also: mkdir(2)
17381750

17391751
## fs.mkdirSync(path[, mode])
17401752
<!-- YAML
@@ -1749,7 +1761,10 @@ changes:
17491761
* `path` {string|Buffer|URL}
17501762
* `mode` {integer} **Default:** `0o777`
17511763

1752-
Synchronous mkdir(2). Returns `undefined`.
1764+
Synchronously creates a directory. Returns `undefined`.
1765+
This is the synchronous version of [`fs.mkdir()`][].
1766+
1767+
See also: mkdir(2)
17531768

17541769
## fs.mkdtemp(prefix[, options], callback)
17551770
<!-- YAML
@@ -3331,10 +3346,13 @@ The following constants are meant for use with the [`fs.Stats`][] object's
33313346
[`fs.Stats`]: #fs_class_fs_stats
33323347
[`fs.access()`]: #fs_fs_access_path_mode_callback
33333348
[`fs.appendFile()`]: fs.html#fs_fs_appendfile_file_data_options_callback
3349+
[`fs.chmod()`]: #fs_fs_chmod_path_mode_callback
3350+
[`fs.chown()`]: #fs_fs_chown_path_uid_gid_callback
33343351
[`fs.exists()`]: fs.html#fs_fs_exists_path_callback
33353352
[`fs.fstat()`]: #fs_fs_fstat_fd_callback
33363353
[`fs.futimes()`]: #fs_fs_futimes_fd_atime_mtime_callback
33373354
[`fs.lstat()`]: #fs_fs_lstat_path_callback
3355+
[`fs.mkdir()`]: #fs_fs_mkdir_path_mode_callback
33383356
[`fs.mkdtemp()`]: #fs_fs_mkdtemp_prefix_options_callback
33393357
[`fs.open()`]: #fs_fs_open_path_flags_mode_callback
33403358
[`fs.read()`]: #fs_fs_read_fd_buffer_offset_length_position_callback

0 commit comments

Comments
 (0)