From 80300fc92d1ba04945ea43feaac4bb6af379629d Mon Sep 17 00:00:00 2001 From: "David Humphrey (:humph) david.humphrey@senecacollege.ca" Date: Wed, 19 Feb 2014 15:27:58 -0500 Subject: [PATCH] More Readme fixes --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0bcc323..fc05724 100644 --- a/README.md +++ b/README.md @@ -1064,12 +1064,13 @@ sh.ls('/dir', { recursive: true }, function(err, entries) { #### sh.exec(path, [options], callback) -Attempts to Execute the .js command located at `path`. Such commands +Attempts to execute the .js command located at `path`. Such commands should be written so as to assume the existence of 3 global variables, which will be defined at runtime: * `options` - an object containing any arguments, data, etc. * `fs` - the `FileSystem` object bound to this shell. -* `callback` - a callback function(error, result) to call when done. +* `callback` - a callback function of the form `function callback(error, result)` +to call when done. The .js command's contents should be the body of a function that looks like this: @@ -1097,6 +1098,7 @@ fs.writeFile('/cmd.js', cmd, callback(err) { if(err) throw err; }); }); +``` #### sh.touch(path, [options], callback)