diff options
author | DuanPengfei <2459714173@qq.com> | 2017-06-16 06:19:16 +0300 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2017-06-19 05:17:58 +0300 |
commit | 6e69421e53c4e7969202464ff1f2654a50443988 (patch) | |
tree | cf5379a74d10d300ae849021b7debfb8272b60b1 /doc/api/path.md | |
parent | aaa80dfd8a385c8b8c53398b03bf53a62c9e4645 (diff) |
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/api/path.md')
-rw-r--r-- | doc/api/path.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/api/path.md b/doc/api/path.md index 34963ae5eb3..a5c5af6d068 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. |