Browse Source

Documentation for path module changes.

v0.7.4-release
isaacs 15 years ago
committed by Ryan Dahl
parent
commit
b3349eb33a
  1. 6
      doc/api.txt

6
doc/api.txt

@ -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: 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" "quux"
------------------------------------ ------------------------------------
+ +

Loading…
Cancel
Save