Skip to content

Commit 7254029

Browse files
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 c1dfaea commit 7254029

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

doc/api/deprecations.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3414,6 +3414,20 @@ Type: Documentation-only
34143414
The [`util.toUSVString()`][] API is deprecated. Please use
34153415
[`String.prototype.toWellFormed`][] instead.
34163416

3417+
### DEP0175: `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK`
3418+
3419+
<!-- YAML
3420+
changes:
3421+
- version: REPLACEME
3422+
pr-url: https://github.com/nodejs/node/pull/49683
3423+
description: Documentation-only deprecation.
3424+
-->
3425+
3426+
Type: Documentation-only
3427+
3428+
`F_OK`, `R_OK`, `W_OK` and `X_OK` getters exposed directly on `node:fs` are
3429+
deprecated. Get them from `fs.constants` or `fs.promises.constants` instead.
3430+
34173431
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
34183432
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
34193433
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

doc/api/fs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,6 +1830,10 @@ concurrent modifications on the same file or data corruption may occur.
18301830
<!-- YAML
18311831
added: v0.11.15
18321832
changes:
1833+
- version: REPLACEME
1834+
pr-url: https://github.com/nodejs/node/pull/49683
1835+
description: The constants `fs.F_OK`, `fs.R_OK`, `fs.W_OK` and `fs.X_OK`
1836+
which were present directly on `fs` are deprecated.
18331837
- version: v18.0.0
18341838
pr-url: https://github.com/nodejs/node/pull/41678
18351839
description: Passing an invalid callback to the `callback` argument

0 commit comments

Comments
 (0)