Airship\Hangar\SessionCommand::findRelativeDir PHP Method

findRelativeDir() protected method

Get the difference between the session root dir and the current dir
protected findRelativeDir ( ) : string
return string
    protected function findRelativeDir()
    {
        $current = \getcwd();
        if (\strpos($this->session['dir'], $current) === 0) {
            $x = Binary::safeStrlen($this->session['dir']);
            return Binary::safeSubstr($current, $x + 1);
        } else {
            throw new \Error('Current path is outside the root directory');
        }
    }