public function join(RelativePathInterface $path)
    {
        if ($path instanceof RelativeWindowsPathInterface) {
            if (!$this->matchesDriveOrNull($this->pathDriveSpecifier($path))) {
                throw new Exception\DriveMismatchException(
                    $this->drive(),
                    $path->drive()
                );
            }

            if ($path->isAnchored()) {
                return $path->joinDrive($this->drive());
            }
        }

        return parent::join($path);
    }
public function join(RelativePathInterface $path)
    {
        if ($path instanceof RelativeWindowsPathInterface) {
            if (!$this->matchesDriveOrNull($this->pathDriveSpecifier($path))) {
                throw new Exception\DriveMismatchException(
                    $this->drive(),
                    $path->drive()
                );
            }

            if ($path->isAnchored()) {
                return $path->joinDrive($this->drive());
            }
        }

        return parent::join($path);
    }
public function join ( RelativePathInterface $ path ) { if ( $ path instanceof RelativeWindowsPathInterface ) { if ( ! $ this -> matchesDriveOrNull ( $ this -> pathDriveSpecifier ( $ path ) ) ) { throw new Exception \ DriveMismatchException ( $ this -> drive ( ) , $ path -> drive ( ) ) ; } if ( $ path -> isAnchored ( ) ) { return $ path -> joinDrive ( $ this -> drive ( ) ) ; } } return parent :: join ( $ path ) ; }
Joins the supplied path to this path.

@param RelativePathInterface $path The path whose atoms should be joined to this path.

@return PathInterface                    A new path with the supplied path suffixed to this path.
@throws Exception\DriveMismatchException If the supplied path has a drive that does not match this path's drive.
Joins the supplied path to this path .