public function write($data)
    {
        $content = $this->file->data();
        $content = substr($content, 0, $this->position());
        $content .= $data;
        $this->file->setData($content);
        $written = strlen($data);
        $this->offsetPosition($written);
        $this->file->setModificationTime(time());
        $this->file->setChangeTime(time());

        return $written;
    }