Skip to content

Commit 86067f0

Browse files
committedAug 30, 2016
doc: clarify that path on windows accepts / and \
Fixes: #6520 PR-URL: #8291 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 5a7a6d9 commit 86067f0

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

‎doc/api/path.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,13 @@ path.isAbsolute('.') // false
261261
On Windows:
262262

263263
```js
264-
path.isAbsolute('//server') // true
265-
path.isAbsolute('C:/foo/..') // true
266-
path.isAbsolute('bar\\baz') // false
267-
path.isAbsolute('.') // false
264+
path.isAbsolute('//server') // true
265+
path.isAbsolute('\\\\server') // true
266+
path.isAbsolute('C:/foo/..') // true
267+
path.isAbsolute('C:\\foo\\..') // true
268+
path.isAbsolute('bar\\baz') // false
269+
path.isAbsolute('bar/baz') // false
270+
path.isAbsolute('.') // false
268271
```
269272

270273
A [`TypeError`][] is thrown if `path` is not a string.
@@ -509,6 +512,10 @@ added: v0.11.15
509512
The `path.win32` property provides access to Windows-specific implementations
510513
of the `path` methods.
511514

515+
*Note*: On Windows, both the forward slash (`/`) and backward slash (`\`)
516+
characters are accepted as path delimiters; however, only the backward slash
517+
(`\`) will be used in return values.
518+
512519
[`path.posix`]: #path_path_posix
513520
[`path.win32`]: #path_path_win32
514521
[`path.parse()`]: #path_path_parse_path

0 commit comments

Comments
 (0)
Please sign in to comment.