public function isWritable()
    {
        if (is_resource($this->stream) === true) {
            $metadata = $this->getMetadata();
            return Validator::isWritable($metadata);
        }
        return false;
    }