public function toReal()
    {
        if (!$this->isAbsolute()) {
            throw new \Exception("Path '{$this}' is not absolute");
        }

        $target = explode('/', $this->_name);
        
        $name = [];
        foreach ($target as $part) {
            if ($part == '..') {
                array_pop($name);
            } else if ($part != '.') {
                $name[] = $part;
            }
        }
        $name = implode('/', $name);

        $class = get_class($this);
        return new $class($name);
    }
public function toReal()
    {
        if (!$this->isAbsolute()) {
            throw new \Exception("Path '{$this}' is not absolute");
        }

        $target = explode('/', $this->_name);
        
        $name = [];
        foreach ($target as $part) {
            if ($part == '..') {
                array_pop($name);
            } else if ($part != '.') {
                $name[] = $part;
            }
        }
        $name = implode('/', $name);

        $class = get_class($this);
        return new $class($name);
    }
public function toReal ( ) { if ( ! $ this -> isAbsolute ( ) ) { throw new \ Exception ( "Path '{$this}' is not absolute" ) ; } $ target = explode ( '/' , $ this -> _name ) ; $ name = [ ] ; foreach ( $ target as $ part ) { if ( $ part == '..' ) { array_pop ( $ name ) ; } else if ( $ part != '.' ) { $ name [ ] = $ part ; } } $ name = implode ( '/' , $ name ) ; $ class = get_class ( $ this ) ; return new $ class ( $ name ) ; }
Reduce absolute path with relative parts to real path.
@return Coast\Path
Reduce absolute path with relative parts to real path .