summaryrefslogtreecommitdiff
path: root/doc/api/globals.markdown
diff options
context:
space:
mode:
authorThomas Shinnick <tshinnic@gmail.com>2011-08-31 08:12:34 -0500
committerBen Noordhuis <info@bnoordhuis.nl>2011-09-06 18:19:41 +0200
commit4cf0ce5bb4c20ed7e145785988d9be56671a0c69 (patch)
tree44a31d660ddf2877da20736f015281b056be1a4e /doc/api/globals.markdown
parentfb93ab4125362271d9e5eda07179cb725b90779d (diff)
downloadnode-new-4cf0ce5bb4c20ed7e145785988d9be56671a0c69.tar.gz
docs: typos and minor edits in several modules
Mostly quite minor edits. Those possibly of more interest are: emitter.setMaxListeners(n) That the limit is per event name for an emitter. fs.readlink() Not a path, but rather the symbolic link's string value, which would be at best a partial path, certainly not a 'resolvedPath' global.__filename This may be "well-known" but this is a full path to the module that referencing code is running in. It is not the main program's path, unless you are in the main program. Each module knows only its own path. server.listen(port,...) I actually needed this functionality... "gimme just _any_ next port" stream.end() stream.destroy() Yeah, everybody knows what happens to the queued data, but let's make it *really* explicit for the first readers.
Diffstat (limited to 'doc/api/globals.markdown')
-rw-r--r--doc/api/globals.markdown10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/api/globals.markdown b/doc/api/globals.markdown
index 6ac5f2c328..cc457a7c42 100644
--- a/doc/api/globals.markdown
+++ b/doc/api/globals.markdown
@@ -1,6 +1,6 @@
## Global Objects
-These object are available in all modules. Some of these objects aren't
+These objects are available in all modules. Some of these objects aren't
actually in the global scope but in the module scope - this will be noted.
### global
@@ -43,8 +43,10 @@ value from this object, the next `require` will reload the module.
### __filename
-The filename of the script being executed. This is the absolute path, and not necessarily
-the same filename passed in as a command line argument.
+The filename of the code being executed. This is the resolved absolute path
+of this code file. For a main program this is not necessarily the same
+filename used in the command line. The value inside a module is the path
+to that module file.
Example: running `node example.js` from `/Users/mjr`
@@ -55,7 +57,7 @@ Example: running `node example.js` from `/Users/mjr`
### __dirname
-The dirname of the script being executed.
+The name of the directory that the currently executing script resides in.
Example: running `node example.js` from `/Users/mjr`