Skip to content

Commit f4041ce

Browse files
LiviaMedeirosruyadorno
authored andcommitted
doc: deprecate fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK
PR-URL: #49683 Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent aea7371 commit f4041ce

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

doc/api/deprecations.md

+14
Original file line numberDiff line numberDiff line change
@@ -3406,6 +3406,20 @@ Type: Documentation-only
34063406
The [`util.toUSVString()`][] API is deprecated. Please use
34073407
[`String.prototype.toWellFormed`][] instead.
34083408

3409+
### DEP0175: `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK`
3410+
3411+
<!-- YAML
3412+
changes:
3413+
- version: REPLACEME
3414+
pr-url: https://github.com/nodejs/node/pull/49683
3415+
description: Documentation-only deprecation.
3416+
-->
3417+
3418+
Type: Documentation-only
3419+
3420+
`F_OK`, `R_OK`, `W_OK` and `X_OK` getters exposed directly on `node:fs` are
3421+
deprecated. Get them from `fs.constants` or `fs.promises.constants` instead.
3422+
34093423
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
34103424
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
34113425
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

doc/api/fs.md

+4
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,10 @@ concurrent modifications on the same file or data corruption may occur.
18201820
<!-- YAML
18211821
added: v0.11.15
18221822
changes:
1823+
- version: REPLACEME
1824+
pr-url: https://github.com/nodejs/node/pull/49683
1825+
description: The constants `fs.F_OK`, `fs.R_OK`, `fs.W_OK` and `fs.X_OK`
1826+
which were present directly on `fs` are deprecated.
18231827
- version: v18.0.0
18241828
pr-url: https://github.com/nodejs/node/pull/41678
18251829
description: Passing an invalid callback to the `callback` argument

0 commit comments

Comments
 (0)