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>
This commit is contained in:
parent
aaa80dfd8a
commit
6e69421e53
@ -445,9 +445,9 @@ changes:
|
|||||||
* `to` {string}
|
* `to` {string}
|
||||||
* Returns: {string}
|
* Returns: {string}
|
||||||
|
|
||||||
The `path.relative()` method returns the relative path from `from` to `to`.
|
The `path.relative()` method returns the relative path from `from` to `to` based
|
||||||
If `from` and `to` each resolve to the same path (after calling `path.resolve()`
|
on the current working directory. If `from` and `to` each resolve to the same
|
||||||
on each), a zero-length string is returned.
|
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
|
If a zero-length string is passed as `from` or `to`, the current working
|
||||||
directory will be used instead of the zero-length strings.
|
directory will be used instead of the zero-length strings.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user