Skip to content

Commit

Permalink
path: allow calling platform specific methods
Browse files Browse the repository at this point in the history
Add path.posix and path.win32 which have the specific methods like
resolve and normalize so you can specifically normalize or resolve
based on the target platform.

PR-URL: nodejs/node-v0.x-archive#5661
Reviewed-by: Chris Dickinson <[email protected]>
  • Loading branch information
tjfontaine authored and chrisdickinson committed Nov 21, 2014
1 parent 4dc8b26 commit 6a90a06
Show file tree
Hide file tree
Showing 3 changed files with 517 additions and 484 deletions.
10 changes: 10 additions & 0 deletions doc/api/path.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,13 @@ An example on Windows:
process.env.PATH.split(path.delimiter)
// returns
['C:\Windows\system32', 'C:\Windows', 'C:\Program Files\nodejs\']

## path.posix

Provide access to aforementioned `path` methods but always interact in a posix
compatible way.

## path.win32

Provide access to aforementioned `path` methods but always interact in a win32
compatible way.
Loading

0 comments on commit 6a90a06

Please sign in to comment.