diff options
Diffstat (limited to 'lib/fs/index.js')
-rw-r--r-- | lib/fs/index.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/fs/index.js b/lib/fs/index.js index 1961b07..7b8fc46 100644 --- a/lib/fs/index.js +++ b/lib/fs/index.js @@ -1,9 +1,10 @@ -var Q = require('q'); var _ = require('lodash'); var path = require('path'); var Buffer = require('buffer').Buffer; var destroy = require('destroy'); +var Promise = require('../utils/promise'); + /* A filesystem is an interface to read/write files GitBook can works with a virtual filesystem, for example in the browser. @@ -73,7 +74,7 @@ FS.prototype.listAllFiles = function(folder) { }); } }); - }, Q([])); + }, Promise([])); }); }; @@ -88,7 +89,7 @@ FS.prototype.readAsString = function(filename) { // Write a stream to a file and returns a promise FS.prototype.writeStream = function(filename, stream) { var bufs = []; - var d = Q.defer(); + var d = Promise.defer(); var cleanup = function() { destroy(stream); |