File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ string will be the contents of the `base` property.
100
100
If the ` base ` property is not supplied, a concatenation of the ` name ` property
101
101
and the ` ext ` property will be used as the ` base ` property.
102
102
103
+ An example on Posix systems:
104
+
103
105
``` js
104
106
path .format ({
105
107
root : " /" ,
@@ -111,6 +113,19 @@ path.format({
111
113
// returns '/home/user/dir/file.txt'
112
114
```
113
115
116
+ An example on Windows:
117
+
118
+ ``` js
119
+ path .format ({
120
+ root : " C:\\ " ,
121
+ dir : " C:\\ path\\ dir" ,
122
+ base : " file.txt" ,
123
+ ext : " .txt" ,
124
+ name : " file"
125
+ })
126
+ // returns 'C:\\path\\dir\\file.txt'
127
+ ```
128
+
114
129
## path.isAbsolute(path)
115
130
116
131
Determines whether ` path ` is an absolute path. An absolute path will always
You can’t perform that action at this time.
0 commit comments