code: function WriteStream(path, options, flush) {
    // Not exposed so we can avoid the case where someone doesn't use `new`
  
    if (typeof options === 'function') {
      flush = options;
      options = null;
    }
  
    options = options || {};
  
    Writable.call(this, options);
  
    this.flush = flush;
    this.path = path;
  
    this.mode = options.mode || constants.DEFAULT_FILE_MODE;
    this.flags = options.flags || 'w';
  
    // Used by node's `fs.WriteStream`
    this.fd = null;
    this.start = null;
  
    this.open();
  
    // Dispose on finish.
    this.once('finish', this.close);
  }
docs: Taken from node core and altered to receive a flush function and simplified To be used for cleanup (like updating times/mode/etc)