Browse Source

doc: clarify that path on windows accepts / and \

Fixes: https://github.com/nodejs/node/issues/6520
PR-URL: https://github.com/nodejs/node/pull/8291
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
v6.x
James M Snell 8 years ago
committed by Jeremiah Senkpiel
parent
commit
b553e57f5f
  1. 7
      doc/api/path.md

7
doc/api/path.md

@ -262,8 +262,11 @@ On Windows:
```js
path.isAbsolute('//server') // true
path.isAbsolute('\\\\server') // true
path.isAbsolute('C:/foo/..') // true
path.isAbsolute('C:\\foo\\..') // true
path.isAbsolute('bar\\baz') // false
path.isAbsolute('bar/baz') // false
path.isAbsolute('.') // false
```
@ -509,6 +512,10 @@ added: v0.11.15
The `path.win32` property provides access to Windows-specific implementations
of the `path` methods.
*Note*: On Windows, both the forward slash (`/`) and backward slash (`\`)
characters are accepted as path delimiters; however, only the backward slash
(`\`) will be used in return values.
[`path.posix`]: #path_path_posix
[`path.win32`]: #path_path_win32
[`path.parse()`]: #path_path_parse_path

Loading…
Cancel
Save