Skip to content

Commit

Permalink
doc: Add windows example for Path.format
Browse files Browse the repository at this point in the history
PR-URL: #5700
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
mithun-daa authored and jasnell committed Mar 21, 2016
1 parent 8d39481 commit 54e6a8d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/api/path.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ and the `ext` property will be used as the `base` property.

Examples:

An example on Posix systems:

```js
path.format({
root : "/",
Expand All @@ -125,6 +127,19 @@ path.format({
// returns '/file.txt'
```

An example on Windows:

```js
path.format({
root : "C:\\",
dir : "C:\\path\\dir",
base : "file.txt",
ext : ".txt",
name : "file"
})
// returns 'C:\\path\\dir\\file.txt'
```

## path.isAbsolute(path)

Determines whether `path` is an absolute path. An absolute path will always
Expand Down

0 comments on commit 54e6a8d

Please sign in to comment.