Cake\Upgrade\Shell\Task\LocationsTask::_shouldProcess PHP Method

_shouldProcess() protected method

Is the current path within the scope of any move?
protected _shouldProcess ( string $path ) : boolean
$path string
return boolean
    protected function _shouldProcess($path)
    {
        $root = !empty($this->params['root']) ? $this->params['root'] : $this->args[0];
        $root = rtrim($root, DS);
        $relativeFromRoot = str_replace($root, '', $path);
        if (strpos($relativeFromRoot, DS . 'Plugin' . DS) || strpos($relativeFromRoot, DS . 'plugins' . DS)) {
            return false;
        }
        if (strpos($relativeFromRoot, DS . 'Vendor' . DS) || strpos($relativeFromRoot, DS . 'vendors' . DS)) {
            return false;
        }
        foreach (array_keys($this->_moves()) as $substr) {
            if (strpos($relativeFromRoot, DS . $substr . DS) !== false) {
                return true;
            }
        }
        return false;
    }