Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExE Boss <3889017+ExE-Boss@users.noreply.github.com>2020-08-29 02:10:00 +0300
committerNode.js GitHub Bot <github-bot@iojs.org>2020-10-20 17:27:31 +0300
commit4f296d270ac2e32bf8841a3bca09e86f28699698 (patch)
tree73c094ebbe016cd0fa8260e88c3bd02b62f256ba /doc/api/path.md
parent9e227d5ae2f4fa1665f50eccc54022da53fa0ec4 (diff)
path: add `path/posix` and `path/win32` alias modules
Refs: https://github.com/nodejs/node/pull/31553 Refs: https://github.com/nodejs/node/pull/32953 Refs: https://github.com/nodejs/node/pull/33950 Refs: https://github.com/nodejs/node/pull/34001 Refs: https://github.com/nodejs/node/pull/34002 Refs: https://github.com/nodejs/node/pull/34055 PR-URL: https://github.com/nodejs/node/pull/34962 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Diffstat (limited to 'doc/api/path.md')
-rw-r--r--doc/api/path.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/api/path.md b/doc/api/path.md
index c26a98e59c9..36c281b772e 100644
--- a/doc/api/path.md
+++ b/doc/api/path.md
@@ -434,6 +434,10 @@ A [`TypeError`][] is thrown if `path` is not a string.
## `path.posix`
<!-- YAML
added: v0.11.15
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/34962
+ description: Exposed as `require('path/posix')`.
-->
* {Object}
@@ -441,6 +445,8 @@ added: v0.11.15
The `path.posix` property provides access to POSIX specific implementations
of the `path` methods.
+The API is accessible via `require('path').posix` or `require('path/posix')`.
+
## `path.relative(from, to)`
<!-- YAML
added: v0.5.0
@@ -568,6 +574,10 @@ method is non-operational and always returns `path` without modifications.
## `path.win32`
<!-- YAML
added: v0.11.15
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/34962
+ description: Exposed as `require('path/win32')`.
-->
* {Object}
@@ -575,6 +585,8 @@ added: v0.11.15
The `path.win32` property provides access to Windows-specific implementations
of the `path` methods.
+The API is accessible via `require('path').win32` or `require('path/win32')`.
+
[MSDN-Rel-Path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths
[`TypeError`]: errors.md#errors_class_typeerror
[`path.parse()`]: #path_path_parse_path