mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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:
1 parent
71581e9308
commit
24feb333c8
1 file changed
+3
-3
+3
-3
@@ -426,9 +426,9 @@ added: v0.5.0
|
||||
* `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.
|
||||
|
||||
Reference in new issue
Block a user