OCA\Richdocuments\Genesis::validate PHP Method

validate() protected method

Check if genesis is valid
protected validate ( OC\Files\View $view, string $path )
$view OC\Files\View
$path string relative to the view
    protected function validate($view, $path)
    {
        if (!$view->file_exists($path)) {
            throw new \Exception('Document not found ' . $path);
        }
        if (!$view->is_file($path)) {
            throw new \Exception('Object ' . $path . ' is not a file.');
        }
        //TODO check if it is a valid odt
    }