diff options
author | isaacs <i@izs.me> | 2012-02-27 23:09:34 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-03-01 04:04:52 +0400 |
commit | 3ce782b7f2bf5041e67d41babfacecbbc01a8728 (patch) | |
tree | 89eeff8b5716972a0022f0adde950cb78ca82a33 /doc/api | |
parent | 8a121fa0e7b643bfd1f545fa30c5013427ec76f5 (diff) |
doc refactor: path
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/path.markdown | 16 |
1 files changed, 8 insertions, 8 deletions
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 |