|
|
@ -429,15 +429,6 @@ fs.writeFileSync = function (path, data, encoding) { |
|
|
|
fs.closeSync(fd); |
|
|
|
}; |
|
|
|
|
|
|
|
fs.cat = function () { |
|
|
|
throw new Error("fs.cat is deprecated. Please use fs.readFile instead."); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
fs.catSync = function () { |
|
|
|
throw new Error("fs.catSync is deprecated. Please use fs.readFileSync instead."); |
|
|
|
}; |
|
|
|
|
|
|
|
// Stat Change Watchers
|
|
|
|
|
|
|
|
var statWatchers = {}; |
|
|
@ -756,17 +747,6 @@ ReadStream.prototype._emitData = function (d) { |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var readStreamForceCloseWarning; |
|
|
|
|
|
|
|
ReadStream.prototype.forceClose = function (cb) { |
|
|
|
if (!readStreamForceCloseWarning) { |
|
|
|
readStreamForceCloseWarning = "ReadStream.prototype.forceClose renamed to destroy()"; |
|
|
|
util.error(readStreamForceCloseWarning); |
|
|
|
} |
|
|
|
return this.destroy(cb); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
ReadStream.prototype.destroy = function (cb) { |
|
|
|
var self = this; |
|
|
|
this.readable = false; |
|
|
@ -848,7 +828,6 @@ util.inherits(WriteStream, events.EventEmitter); |
|
|
|
|
|
|
|
fs.FileWriteStream = fs.WriteStream; // support the legacy name
|
|
|
|
|
|
|
|
|
|
|
|
WriteStream.prototype.flush = function () { |
|
|
|
if (this.busy) return; |
|
|
|
var self = this; |
|
|
@ -907,7 +886,6 @@ WriteStream.prototype.flush = function () { |
|
|
|
method.apply(this, args); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
WriteStream.prototype.write = function (data) { |
|
|
|
if (!this.writable) { |
|
|
|
throw new Error('stream not writable'); |
|
|
@ -934,36 +912,12 @@ WriteStream.prototype.write = function (data) { |
|
|
|
return false; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var writeStreamCloseWarning; |
|
|
|
|
|
|
|
WriteStream.prototype.close = function (cb) { |
|
|
|
if (!writeStreamCloseWarning) { |
|
|
|
writeStreamCloseWarning = "WriteStream.prototype.close renamed to end()"; |
|
|
|
util.error(writeStreamCloseWarning); |
|
|
|
} |
|
|
|
return this.end(cb); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
WriteStream.prototype.end = function (cb) { |
|
|
|
this.writable = false; |
|
|
|
this._queue.push([fs.close, cb]); |
|
|
|
this.flush(); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var writeStreamForceCloseWarning; |
|
|
|
|
|
|
|
WriteStream.prototype.forceClose = function (cb) { |
|
|
|
if (!writeStreamForceCloseWarning) { |
|
|
|
writeStreamForceCloseWarning = "WriteStream.prototype.forceClose renamed to destroy()"; |
|
|
|
util.error(writeStreamForceCloseWarning); |
|
|
|
} |
|
|
|
return this.destroy(cb); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
WriteStream.prototype.destroy = function (cb) { |
|
|
|
var self = this; |
|
|
|
this.writable = false; |
|
|
|