From b3349eb33abb65969dbb3b96bb797413c594652a Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 8 Jan 2010 12:47:01 -0800 Subject: [PATCH] Documentation for path module changes. --- doc/api.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api.txt b/doc/api.txt index ea814f3b5b..0a04451b9d 100644 --- a/doc/api.txt +++ b/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: + ------------------------------------ -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" ------------------------------------ +