More README fixes
This commit is contained in:
parent
80300fc92d
commit
8eac72b9d0
12
README.md
12
README.md
|
@ -1064,9 +1064,10 @@ sh.ls('/dir', { recursive: true }, function(err, entries) {
|
||||||
|
|
||||||
#### sh.exec(path, [options], callback)<a name="exec"></a>
|
#### sh.exec(path, [options], callback)<a name="exec"></a>
|
||||||
|
|
||||||
Attempts to execute the .js command located at `path`. Such commands
|
Attempts to execute the .js command located at `path`. The `sh.exec` method
|
||||||
should be written so as to assume the existence of 3 global variables,
|
enables apps to install larger programs into the file system and run them
|
||||||
which will be defined at runtime:
|
later without having to re-download. Such commands should be written so as
|
||||||
|
to assume the existence of 3 global variables, which will be defined at runtime:
|
||||||
* `options` - <Object> an object containing any arguments, data, etc.
|
* `options` - <Object> an object containing any arguments, data, etc.
|
||||||
* `fs` - <FileSystem> the `FileSystem` object bound to this shell.
|
* `fs` - <FileSystem> the `FileSystem` object bound to this shell.
|
||||||
* `callback` - <Function> a callback function of the form `function callback(error, result)`
|
* `callback` - <Function> a callback function of the form `function callback(error, result)`
|
||||||
|
@ -1104,8 +1105,9 @@ fs.writeFile('/cmd.js', cmd, callback(err) {
|
||||||
|
|
||||||
Create a file if it does not exist, or update the access and modified
|
Create a file if it does not exist, or update the access and modified
|
||||||
times if it does. Valid options include:
|
times if it does. Valid options include:
|
||||||
* updateOnly - <Boolean> whether to create the file if it is missing (defaults to `false`)
|
* `updateOnly` - `true` if the file's access/modified dates are to be updated
|
||||||
* date - <Date> a date to use instead of the current date and time when updating
|
only (but missing file not to be)
|
||||||
|
* `date` - a date to use instead of the current date and time when updating
|
||||||
access and modified dates.
|
access and modified dates.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
Loading…
Reference in New Issue