/**
  * writes data into the stream
  *
  * @param   string  $data
  * @return  int     amount of bytes written
  */
 public function stream_write($data)
 {
     if (self::READONLY === $this->mode) {
         return 0;
     }
     if ($this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) {
         return 0;
     }
     return $this->content->write($data);
 }