From 3ce782b7f2bf5041e67d41babfacecbbc01a8728 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 27 Feb 2012 11:09:34 -0800 Subject: doc refactor: path --- doc/api/path.markdown | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc/api') diff --git a/doc/api/path.markdown b/doc/api/path.markdown index ba48bd29c8e..06b6d217794 100644 --- a/doc/api/path.markdown +++ b/doc/api/path.markdown @@ -1,4 +1,4 @@ -## Path +# Path This module contains utilities for handling and transforming file paths. Almost all these methods perform only string transformations. @@ -9,7 +9,7 @@ logically be found in the fs module as they do access the file system. Use `require('path')` to use this module. The following methods are provided: -### path.normalize(p) +## path.normalize(p) Normalize a string path, taking care of `'..'` and `'.'` parts. @@ -23,7 +23,7 @@ Example: // returns '/foo/bar/baz/asdf' -### path.join([path1], [path2], [...]) +## path.join([path1], [path2], [...]) Join all arguments together and normalize the resulting path. Non-string arguments are ignored. @@ -38,7 +38,7 @@ Example: // returns 'foo/bar' -### path.resolve([from ...], to) +## path.resolve([from ...], to) Resolves `to` to an absolute path. @@ -77,7 +77,7 @@ Examples: // if currently in /home/myself/node, it returns '/home/myself/node/wwwroot/static_files/gif/image.gif' -### path.relative(from, to) +## path.relative(from, to) Solve the relative path from `from` to `to`. @@ -97,7 +97,7 @@ Examples: // returns '../../impl/bbb' -### path.dirname(p) +## path.dirname(p) Return the directory name of a path. Similar to the Unix `dirname` command. @@ -107,7 +107,7 @@ Example: // returns '/foo/bar/baz/asdf' -### path.basename(p, [ext]) +## path.basename(p, [ext]) Return the last portion of a path. Similar to the Unix `basename` command. @@ -121,7 +121,7 @@ Example: // returns 'quux' -### path.extname(p) +## path.extname(p) Return the extension of the path, from the last '.' to end of string in the last portion of the path. If there is no '.' in the last portion -- cgit v1.2.3