function openForWrite()
    {
        $this->mode_xxx['write'] = 'W';

        if (!$this->hasCreate() && !$this->hasXCreate())
            ## write to file must has create or xcreate by default
            $this->createFile();

        return $this;
    }