@@ -9,6 +9,9 @@ The file system is not consulted to check whether paths are valid.
99Use ` require('path') ` to use this module. The following methods are provided:
1010
1111## path.basename(p[ , ext] )
12+ <!-- YAML
13+ added: v0.1.25
14+ -->
1215
1316Return the last portion of a path. Similar to the Unix ` basename ` command.
1417
@@ -23,6 +26,9 @@ path.basename('/foo/bar/baz/asdf/quux.html', '.html')
2326```
2427
2528## path.delimiter
29+ <!-- YAML
30+ added: v0.9.3
31+ -->
2632
2733The platform-specific path delimiter, ` ; ` or ` ':' ` .
2834
@@ -47,6 +53,9 @@ process.env.PATH.split(path.delimiter)
4753```
4854
4955## path.dirname(p)
56+ <!-- YAML
57+ added: v0.1.16
58+ -->
5059
5160Return the directory name of a path. Similar to the Unix ` dirname ` command.
5261
@@ -58,6 +67,9 @@ path.dirname('/foo/bar/baz/asdf/quux')
5867```
5968
6069## path.extname(p)
70+ <!-- YAML
71+ added: v0.1.25
72+ -->
6173
6274Return the extension of the path, from the last '.' to end of string
6375in the last portion of the path. If there is no '.' in the last portion
@@ -82,6 +94,9 @@ path.extname('.index')
8294```
8395
8496## path.format(pathObject)
97+ <!-- YAML
98+ added: v0.11.15
99+ -->
85100
86101Returns a path string from an object, the opposite of [ ` path.parse ` ] [ ] .
87102
@@ -106,6 +121,9 @@ path.format({
106121```
107122
108123## path.isAbsolute(path)
124+ <!-- YAML
125+ added: v0.11.2
126+ -->
109127
110128Determines whether ` path ` is an absolute path. An absolute path will always
111129resolve to the same location, regardless of the working directory.
@@ -133,6 +151,9 @@ path.isAbsolute('.') // false
133151 returned.
134152
135153## path.join([ path1] [ , path2 ] [ , ...] )
154+ <!-- YAML
155+ added: v0.1.16
156+ -->
136157
137158Join all arguments together and normalize the resulting path.
138159
@@ -156,6 +177,9 @@ TypeError: Arguments to path.join must be strings
156177 current working directory.
157178
158179## path.normalize(p)
180+ <!-- YAML
181+ added: v0.1.23
182+ -->
159183
160184Normalize a string path, taking care of ` '..' ` and ` '.' ` parts.
161185
@@ -174,6 +198,9 @@ path.normalize('/foo/bar//baz/asdf/quux/..')
174198 will be returned, which represents the current working directory.
175199
176200## path.parse(pathString)
201+ <!-- YAML
202+ added: v0.11.15
203+ -->
177204
178205Returns an object from a path string.
179206
@@ -206,11 +233,17 @@ path.parse('C:\\path\\dir\\index.html')
206233```
207234
208235## path.posix
236+ <!-- YAML
237+ added: v0.11.15
238+ -->
209239
210240Provide access to aforementioned ` path ` methods but always interact in a posix
211241compatible way.
212242
213243## path.relative(from, to)
244+ <!-- YAML
245+ added: v0.5.0
246+ -->
214247
215248Solve the relative path from ` from ` to ` to ` .
216249
@@ -237,6 +270,9 @@ path.relative('/data/orandea/test/aaa', '/data/orandea/impl/bbb')
237270 both the paths are the same then a zero-length string will be returned.
238271
239272## path.resolve([ from ...] , to)
273+ <!-- YAML
274+ added: v0.3.4
275+ -->
240276
241277Resolves ` to ` to an absolute path.
242278
@@ -283,6 +319,9 @@ path.resolve('wwwroot', 'static_files/png/', '../gif/image.gif')
283319 working directory will be used instead of them.
284320
285321## path.sep
322+ <!-- YAML
323+ added: v0.7.9
324+ -->
286325
287326The platform-specific file separator. ` '\\' ` or ` '/' ` .
288327
@@ -301,6 +340,9 @@ An example on Windows:
301340```
302341
303342## path.win32
343+ <!-- YAML
344+ added: v0.11.15
345+ -->
304346
305347Provide access to aforementioned ` path ` methods but always interact in a win32
306348compatible way.
0 commit comments