コード例 #1
0
 public function equals($other, $sameType = true)
 {
     // Make sure the types are equal
     if ($sameType && !(get_class() === get_class($other))) {
         return false;
     }
     // Convert $other into a string, return false if failed
     if (($other = FilesystemObjectHelper::asPath($other, false)) === null) {
         return false;
     }
     // Compare the paths, return the result
     return StringUtils::equals($this->getPath(), $other, false, true);
 }