|
|
@ -1,3 +1,7 @@ |
|
|
|
var |
|
|
|
sys = require('sys'), |
|
|
|
events = require('events'); |
|
|
|
|
|
|
|
exports.Stats = process.Stats; |
|
|
|
|
|
|
|
process.Stats.prototype._checkModeProperty = function (property) { |
|
|
@ -381,6 +385,8 @@ exports.createReadStream = function(path, options) { |
|
|
|
}; |
|
|
|
|
|
|
|
var FileReadStream = exports.FileReadStream = function(path, options) { |
|
|
|
events.EventEmitter.call(this); |
|
|
|
|
|
|
|
this.path = path; |
|
|
|
this.fd = null; |
|
|
|
this.readable = true; |
|
|
@ -463,13 +469,15 @@ var FileReadStream = exports.FileReadStream = function(path, options) { |
|
|
|
read(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
FileReadStream.prototype.__proto__ = process.EventEmitter.prototype; |
|
|
|
sys.inherits(FileReadStream, events.EventEmitter); |
|
|
|
|
|
|
|
exports.createWriteStream = function(path, options) { |
|
|
|
return new FileWriteStream(path, options); |
|
|
|
}; |
|
|
|
|
|
|
|
var FileWriteStream = exports.FileWriteStream = function(path, options) { |
|
|
|
events.EventEmitter.call(this); |
|
|
|
|
|
|
|
this.path = path; |
|
|
|
this.fd = null; |
|
|
|
this.writeable = true; |
|
|
@ -564,4 +572,4 @@ var FileWriteStream = exports.FileWriteStream = function(path, options) { |
|
|
|
|
|
|
|
flush(); |
|
|
|
}; |
|
|
|
FileWriteStream.prototype.__proto__ = process.EventEmitter.prototype; |
|
|
|
sys.inherits(FileWriteStream, events.EventEmitter); |