diff options
author | James M Snell <jasnell@gmail.com> | 2016-08-26 20:36:48 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-08-30 12:29:47 -0700 |
commit | 86067f0129a7f0dc30ad867a5a50941ceb00263b (patch) | |
tree | 4fde90dd181c0307f561275c9e893c37a966baeb /doc | |
parent | 5a7a6d9b01b130c2d36a8c14c6e079314f5941d8 (diff) | |
download | android-node-v8-86067f0129a7f0dc30ad867a5a50941ceb00263b.tar.gz android-node-v8-86067f0129a7f0dc30ad867a5a50941ceb00263b.tar.bz2 android-node-v8-86067f0129a7f0dc30ad867a5a50941ceb00263b.zip |
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>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/path.md | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/doc/api/path.md b/doc/api/path.md index 6617f0e9e7..1067792631 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -261,10 +261,13 @@ path.isAbsolute('.') // false On Windows: ```js -path.isAbsolute('//server') // true -path.isAbsolute('C:/foo/..') // true -path.isAbsolute('bar\\baz') // false -path.isAbsolute('.') // false +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 ``` A [`TypeError`][] is thrown if `path` is not a string. @@ -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 |