aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDuanPengfei <2459714173@qq.com>2017-06-15 23:19:16 -0400
committerRefael Ackermann <refack@gmail.com>2017-06-18 22:17:58 -0400
commit6e69421e53c4e7969202464ff1f2654a50443988 (patch)
treecf5379a74d10d300ae849021b7debfb8272b60b1 /doc
parentaaa80dfd8a385c8b8c53398b03bf53a62c9e4645 (diff)
downloadandroid-node-v8-6e69421e53c4e7969202464ff1f2654a50443988.tar.gz
android-node-v8-6e69421e53c4e7969202464ff1f2654a50443988.tar.bz2
android-node-v8-6e69421e53c4e7969202464ff1f2654a50443988.zip
doc: `path.relative` uses `cwd`
PR-URL: https://github.com/nodejs/node/pull/13714 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/path.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/api/path.md b/doc/api/path.md
index 34963ae5eb..a5c5af6d06 100644
--- a/doc/api/path.md
+++ b/doc/api/path.md
@@ -445,9 +445,9 @@ changes:
* `to` {string}
* Returns: {string}
-The `path.relative()` method returns the relative path from `from` to `to`.
-If `from` and `to` each resolve to the same path (after calling `path.resolve()`
-on each), a zero-length string is returned.
+The `path.relative()` method returns the relative path from `from` to `to` based
+on the current working directory. If `from` and `to` each resolve to the same
+path (after calling `path.resolve()` on each), a zero-length string is returned.
If a zero-length string is passed as `from` or `to`, the current working
directory will be used instead of the zero-length strings.