src/main/php/WorkingDirectory.php
public function changeTo(string $target): bool
    {
        if (file_exists($target) && @chdir($target) === true) {
            $this->current = $target;
            return true;
        }

        return false;
    }
public function changeTo(string $target): bool
    {
        if (file_exists($target) && @chdir($target) === true) {
            $this->current = $target;
            return true;
        }

        return false;
    }
public function changeTo ( string $ target ) : bool { if ( file_exists ( $ target ) && @ chdir ( $ target ) === true ) { $ this -> current = $ target ; return true ; } return false ; }
change current working directory to given target

Please note that this really has a side effect - it doesn't just change
a value inside this object, it really changed the global current working
directory for the whole PHP application!

@param   string  $target  directory to change current working directory to
@return  bool  whether change was successful
change current working directory to given target