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 = {};
};
-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;
fs.FileWriteStream = fs.WriteStream; // support the legacy name
-
WriteStream.prototype.flush = function () {
if (this.busy) return;
var self = this;
method.apply(this, args);
};
-
WriteStream.prototype.write = function (data) {
if (!this.writable) {
throw new Error('stream not writable');
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;