Skip to content

#goodnessSquad - added warning to fs.accessSync with link for instructions about blo… #17503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 34 commits into from
Closed
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8bfc421
* added warning to fs.accessSync with link for instructions about blo…
JonathanDn Dec 6, 2017
2708c48
* Added warning to fs.appendFileSync with link for instructions about…
JonathanDn Dec 6, 2017
1d62048
* Added warning to fs.chownSync with link for instructions about bloc…
JonathanDn Dec 6, 2017
5e48d73
* Added warning to fs.closeSync with link for instructions about bloc…
JonathanDn Dec 6, 2017
b4e810a
* Added warning to fs.copyFileSync with link for instructions about b…
JonathanDn Dec 6, 2017
5f11ddc
* Added warning to fs.fchmodSync && fs.existsSync with link for instr…
JonathanDn Dec 6, 2017
d05f086
* Added warning to fs.fchownSync with link for instructions about blo…
JonathanDn Dec 6, 2017
cfac7b7
* Added warning to fs.fdataSynch with link for instructions about blo…
JonathanDn Dec 6, 2017
ff29537
* Added warning to fs.fstatSync with link for instructions about bloc…
JonathanDn Dec 6, 2017
2a49606
* Added warning to fs.fsyncSync with link for instructions about bloc…
JonathanDn Dec 6, 2017
a5ae266
* Added warning to fs.ftruncateSync with link for instructions about …
JonathanDn Dec 6, 2017
602f98d
* Added warning to fs.futimesSync with link for instructions about bl…
JonathanDn Dec 6, 2017
2aa9f8c
* Added warning to fs.lchmodSync with link for instructions about blo…
JonathanDn Dec 6, 2017
df301a1
* Added warning to fs.linkSync with link for instructions about block…
JonathanDn Dec 6, 2017
9a7c6a2
* Added warning to fs.linkSync with link for instructions about block…
JonathanDn Dec 6, 2017
954e3ed
* Added warning to fs.mkdirSync with link for instructions about bloc…
JonathanDn Dec 6, 2017
d09e99d
* Added warning to fs.mkdtempSync with link for instructions about bl…
JonathanDn Dec 6, 2017
011ddb3
* Added warning to fs.openSync with link for instructions about block…
JonathanDn Dec 6, 2017
0cdd522
* Added warning to fs.readdirSync with link for instructions about bl…
JonathanDn Dec 6, 2017
2981dcf
* Added warning to fs.readFileSync with link for instructions about b…
JonathanDn Dec 6, 2017
32e6df1
* Added warning to fs.readlinkSync with link for instructions about b…
JonathanDn Dec 6, 2017
2932f6e
* Added warning to fs.readSync with link for instructions about block…
JonathanDn Dec 6, 2017
609346a
* Added warning to fs.realPathSync with link for instructions about b…
JonathanDn Dec 6, 2017
fccdef8
* Added warning to fs.renameSync with link for instructions about blo…
JonathanDn Dec 6, 2017
b219c77
* Added warning to fs.rmdirSync with link for instructions about bloc…
JonathanDn Dec 6, 2017
86dbd84
* Added warning to fs.statSync with link for instructions about block…
JonathanDn Dec 6, 2017
24421b9
* Added warning to fs.symlinkSync with link for instructions about bl…
JonathanDn Dec 6, 2017
9f7e313
* Added warning to fs.truncateSync with link for instructions about b…
JonathanDn Dec 6, 2017
9943cb3
* Refactored the note according to trott's recomendation
JonathanDn Dec 6, 2017
a974d6c
* Added the note to more sync functions
JonathanDn Dec 6, 2017
30a2eb9
* Removed redundant dot after links
JonathanDn Dec 6, 2017
3c34644
* Changed all links of "Overview Blocking vs Non-blocking" article to…
JonathanDn Dec 6, 2017
a0328ba
* Capital letters for the link ref
JonathanDn Dec 6, 2017
0cb4b40
* Changed the link refs to more linting friendly to:
JonathanDn Dec 6, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}
* `mode` {integer} **Default:** `fs.constants.F_OK`
Expand Down Expand Up @@ -640,6 +643,9 @@ changes:
pr-url: https://github.com/nodejs/node/pull/3163
description: The `file` parameter can be a file descriptor now.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `file` {string|Buffer|number} filename or file descriptor
* `data` {string|Buffer}
Expand Down Expand Up @@ -719,6 +725,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}
* `uid` {integer}
Expand Down Expand Up @@ -747,6 +756,9 @@ to the completion callback.
<!-- YAML
added: v0.1.21
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}

Expand Down Expand Up @@ -805,6 +817,9 @@ fs.copyFile('source.txt', 'destination.txt', COPYFILE_EXCL, callback);
<!-- YAML
added: v8.5.0
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `src` {string|Buffer|URL} source filename to copy
* `dest` {string|Buffer|URL} destination filename of the copy operation
Expand Down Expand Up @@ -1128,6 +1143,9 @@ are given to the completion callback.
<!-- YAML
added: v0.4.7
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}
* `mode` {integer}
Expand Down Expand Up @@ -1157,6 +1175,9 @@ to the completion callback.
<!-- YAML
added: v0.4.7
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}
* `uid` {integer}
Expand Down Expand Up @@ -1185,6 +1206,9 @@ given to the completion callback.
<!-- YAML
added: v0.1.96
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}

Expand Down Expand Up @@ -1213,6 +1237,9 @@ except that the file to be stat-ed is specified by the file descriptor `fd`.
<!-- YAML
added: v0.1.95
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}

Expand All @@ -1239,6 +1266,9 @@ to the completion callback.
<!-- YAML
added: v0.1.96
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}

Expand Down Expand Up @@ -1307,6 +1337,9 @@ The last three bytes are null bytes ('\0'), to compensate the over-truncation.
<!-- YAML
added: v0.8.6
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}
* `len` {integer} **Default:** `0`
Expand Down Expand Up @@ -1348,6 +1381,9 @@ changes:
description: Numeric strings, `NaN` and `Infinity` are now allowed
time specifiers.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}
* `atime` {integer}
Expand Down Expand Up @@ -1379,6 +1415,9 @@ Only available on macOS.
<!-- YAML
deprecated: v0.4.7
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer}
* `mode` {integer}
Expand Down Expand Up @@ -1448,6 +1487,9 @@ changes:
`URL` objects using `file:` protocol. Support is currently
still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `existingPath` {string|Buffer|URL}
* `newPath` {string|Buffer|URL}
Expand Down Expand Up @@ -1487,6 +1529,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}

Expand Down Expand Up @@ -1523,6 +1568,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}
* `mode` {integer} **Default:** `0o777`
Expand Down Expand Up @@ -1605,6 +1653,9 @@ fs.mkdtemp(`${tmpDir}${sep}`, (err, folder) => {
<!-- YAML
added: v5.10.0
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `prefix` {string}
* `options` {string|Object}
Expand Down Expand Up @@ -1724,6 +1775,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}
* `flags` {string|number}
Expand Down Expand Up @@ -1814,6 +1868,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}
* `options` {string|Object}
Expand Down Expand Up @@ -1914,6 +1971,9 @@ changes:
pr-url: https://github.com/nodejs/node/pull/3163
description: The `path` parameter can be a file descriptor now.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL|integer} filename or file descriptor
* `options` {Object|string}
Expand Down Expand Up @@ -1975,6 +2035,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}
* `options` {string|Object}
Expand All @@ -1995,6 +2058,9 @@ changes:
pr-url: https://github.com/nodejs/node/pull/4518
description: The `length` parameter can now be `0`.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}
* `buffer` {string|Buffer|Uint8Array}
Expand Down Expand Up @@ -2107,6 +2173,9 @@ changes:
pr-url: https://github.com/nodejs/node/pull/3594
description: The `cache` parameter was removed.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}
* `options` {string|Object}
Expand Down Expand Up @@ -2188,6 +2257,9 @@ changes:
objects using `file:` protocol. Support is currently still
*experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `oldPath` {string|Buffer|URL}
* `newPath` {string|Buffer|URL}
Expand Down Expand Up @@ -2227,6 +2299,9 @@ changes:
description: The `path` parameters can be a WHATWG `URL` object using
`file:` protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}

Expand Down Expand Up @@ -2276,6 +2351,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}

Expand Down Expand Up @@ -2323,6 +2401,9 @@ changes:
using `file:` protocol. Support is currently still
*experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `target` {string|Buffer|URL}
* `path` {string|Buffer|URL}
Expand Down Expand Up @@ -2356,6 +2437,9 @@ being thrown in the future.
<!-- YAML
added: v0.8.6
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer}
* `len` {integer} **Default:** `0`
Expand Down Expand Up @@ -2396,6 +2480,9 @@ changes:
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}

Expand Down Expand Up @@ -2475,6 +2562,9 @@ changes:
description: Numeric strings, `NaN` and `Infinity` are now allowed
time specifiers.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `path` {string|Buffer|URL}
* `atime` {integer}
Expand Down Expand Up @@ -2820,6 +2910,9 @@ changes:
pr-url: https://github.com/nodejs/node/pull/3163
description: The `file` parameter can be a file descriptor now.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `file` {string|Buffer|integer} filename or file descriptor
* `data` {string|Buffer|Uint8Array}
Expand All @@ -2841,6 +2934,9 @@ changes:
pr-url: https://github.com/nodejs/node/pull/7856
description: The `offset` and `length` parameters are optional now.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}
* `buffer` {Buffer|Uint8Array}
Expand All @@ -2856,6 +2952,9 @@ changes:
pr-url: https://github.com/nodejs/node/pull/7856
description: The `position` parameter is optional now.
-->
Note that this is a blocking call. Avoid this method in an asynchronous
environment. See [Overview of Blocking vs Non-Blocking][]
for more information.

* `fd` {integer}
* `string` {string}
Expand Down Expand Up @@ -3137,3 +3236,4 @@ The following constants are meant for use with the [`fs.Stats`][] object's
[inode]: https://en.wikipedia.org/wiki/Inode
[Naming Files, Paths, and Namespaces]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
[MSDN-Using-Streams]: https://msdn.microsoft.com/en-us/library/windows/desktop/bb540537.aspx
[Overview of Blocking vs Non-Blocking]: https://nodejs.org/en/docs/guides/blocking-vs-non-blocking/