public function equals($anotherPath) {
		$anotherPath = $anotherPath instanceof Path ? $anotherPath : new Path($anotherPath);

		if ($this->isStream() ^ $anotherPath->isStream()) {
			return false;
		}

		if ($this->isStream() && $anotherPath->isStream()) {
			return $this->toString() === $anotherPath->toString();
		}

		return realpath($this->pathname->toString()) == realpath($anotherPath->toString());
	}
public function equals($anotherPath) {
		$anotherPath = $anotherPath instanceof Path ? $anotherPath : new Path($anotherPath);

		if ($this->isStream() ^ $anotherPath->isStream()) {
			return false;
		}

		if ($this->isStream() && $anotherPath->isStream()) {
			return $this->toString() === $anotherPath->toString();
		}

		return realpath($this->pathname->toString()) == realpath($anotherPath->toString());
	}
public function equals ( $ anotherPath ) { $ anotherPath = $ anotherPath instanceof Path ? $ anotherPath : new Path ( $ anotherPath ) ; if ( $ this -> isStream ( ) ^ $ anotherPath -> isStream ( ) ) { return false ; } if ( $ this -> isStream ( ) && $ anotherPath -> isStream ( ) ) { return $ this -> toString ( ) === $ anotherPath -> toString ( ) ; } return realpath ( $ this -> pathname -> toString ( ) ) == realpath ( $ anotherPath -> toString ( ) ) ; }
Checks whether both paths point to the same location

@param Path|string $anotherPath
@return boolean true if the do, false if they don't
Checks whether both paths point to the same location