};
var ReadStream = fs.ReadStream = function(path, options) {
+ if (!(this instanceof ReadStream)) return new ReadStream(path, options);
+
events.EventEmitter.call(this);
var self = this;
};
var WriteStream = fs.WriteStream = function(path, options) {
+ if (!(this instanceof WriteStream)) return new WriteStream(path, options);
+
events.EventEmitter.call(this);
this.path = path;
var file = path.join(common.fixturesDir, "write.txt");
(function() {
- var stream = fs.createWriteStream(file),
+ var stream = fs.WriteStream(file),
_fs_close = fs.close;
fs.close = function(fd) {