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