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

_process() protected method

Check all moves, and stage moving the file to new location.
protected _process ( mixed $path ) : boolean
$path mixed
return boolean
    protected function _process($path)
    {
        $new = $path;
        foreach ($this->_moves() as $from => $to) {
            $from = $this->_relativeFromRoot($from, $new);
            if (!$this->_isInRoot($to)) {
                $to = 'src' . DS . $to;
            }
            if ($from === 'Lib') {
                $pieces = explode(DS . $from . DS, $new);
                $ending = array_pop($pieces);
                if (strpos($ending, DS) === false) {
                    $to .= DS . 'Lib';
                }
            }
            $new = str_replace(DS . $from . DS, DS . $to . DS, $new);
        }
        if ($new === $path) {
            return false;
        }
        return $this->Stage->move($path, $new);
    }