From 7bfefb525027522150730916dbd8ad1a985a327a Mon Sep 17 00:00:00 2001 From: Micheil Smith Date: Tue, 12 Oct 2010 10:03:02 +1100 Subject: [PATCH] Removed deprecated methods from lib/fs.js --- lib/fs.js | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 178197ce57..1d08a54051 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -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;