Fixed #323 - Updated references to "fs.Shell" in the docs and test suite

This commit is contained in:
Kieran Sedgwick 2014-11-14 12:04:51 -05:00
parent f8ca6e8208
commit 0d4110ff6f
2 changed files with 9 additions and 9 deletions

View File

@ -1093,20 +1093,20 @@ and provides augmented features. Many separate `FileSystemShell` objects can exi
`FileSystem`, but each `FileSystemShell` is bound to a single instance of a `FileSystem` `FileSystem`, but each `FileSystemShell` is bound to a single instance of a `FileSystem`
for its lifetime. for its lifetime.
A `FileSystemShell` is created by calling `Filer.FileSystem().shell()`: A `FileSystemShell` is created by instantiating `Filer.FileSystem().Shell`:
```javascript ```javascript
var fs = new Filer.FileSystem(); var fs = new Filer.FileSystem();
var sh = fs.shell(options); var sh = new fs.Shell(options);
var sh2 = fs.shell(options); var sh2 = new fs.Shell(options);
// sh and sh2 are two separate shells, each bound to fs // sh and sh2 are two separate shells, each bound to fs
``` ```
Or, the original object can be accessed through `Filer`: In addition, the constructor function can be accessed through `Filer`:
```javascript ```javascript
var fs = new Filer.FileSystem(); var fs = new Filer.FileSystem();
var sh = fs.shell(); var sh = new fs.Shell();
Filer.Shell.prototype.newFunction = ...; Filer.Shell.prototype.newFunction = ...;
@ -1120,7 +1120,7 @@ others may be added in the future. You can also add your own, or update existing
```javascript ```javascript
var fs = new Filer.FileSystem(); var fs = new Filer.FileSystem();
var sh = fs.shell({ var sh = new fs.Shell({
env: { env: {
TMP: '/tempdir', TMP: '/tempdir',
PATH: '/one:/two' PATH: '/one:/two'
@ -1146,7 +1146,7 @@ Example:
```javascript ```javascript
var fs = new Filer.FileSystem(); var fs = new Filer.FileSystem();
var sh = fs.shell(); var sh = new fs.Shell();
var p = sh.env.get('PATH'); var p = sh.env.get('PATH');
// Store the current location // Store the current location
@ -1166,7 +1166,7 @@ examples below assume a `FileSystemShell` instance named `sh` has been created l
```javascript ```javascript
var fs = new Filer.FileSystem(); var fs = new Filer.FileSystem();
var sh = fs.shell(); var sh = new fs.Shell();
``` ```
* [sh.cd(path, callback)](#cd) * [sh.cd(path, callback)](#cd)

View File

@ -2,7 +2,7 @@ var Filer = require('../..');
var util = require('../lib/test-utils.js'); var util = require('../lib/test-utils.js');
var expect = require('chai').expect; var expect = require('chai').expect;
describe("fs.shell", function() { describe("fs.Shell", function() {
beforeEach(util.setup); beforeEach(util.setup);
afterEach(util.cleanup); afterEach(util.cleanup);