File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ 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
+ Examples:
104
+
105
+ An example on Posix systems:
106
+
103
107
``` js
104
108
path .format ({
105
109
root : " /" ,
@@ -120,6 +124,19 @@ path.format({
120
124
// returns '/file.txt'
121
125
```
122
126
127
+ An example on Windows:
128
+
129
+ ``` js
130
+ path .format ({
131
+ root : " C:\\ " ,
132
+ dir : " C:\\ path\\ dir" ,
133
+ base : " file.txt" ,
134
+ ext : " .txt" ,
135
+ name : " file"
136
+ })
137
+ // returns 'C:\\path\\dir\\file.txt'
138
+ ```
139
+
123
140
## path.isAbsolute(path)
124
141
125
142
Determines whether ` path ` is an absolute path. An absolute path will always
You can’t perform that action at this time.
0 commit comments