Documentation for path module changes.
authorisaacs <i@foohack.com>
Fri, 8 Jan 2010 20:47:01 +0000 (12:47 -0800)
committerRyan Dahl <ry@tinyclouds.org>
Sat, 9 Jan 2010 08:38:05 +0000 (00:38 -0800)
doc/api.txt

index ea814f3..0a04451 100644 (file)
@@ -1539,11 +1539,13 @@ node> require("path").dirname("/foo/bar/baz/asdf/quux")
 ------------------------------------
 +
 
-+path.filename(p)+::
++path.basename(p, ext)+::
 Return the last portion of a path.  Similar to the Unix +basename+ command.  Example:
 +
 ------------------------------------
-node> require("path").filename("/foo/bar/baz/asdf/quux")
+node> require("path").filename("/foo/bar/baz/asdf/quux.html")
+"quux.html"
+node> require("path").filename("/foo/bar/baz/asdf/quux.html", ".html")
 "quux"
 ------------------------------------
 +