/** * Check whether equals to another file * * @param File|string $file File object or path * * @return boolean */ public function equals($file) { if (!$file instanceof File) { $file = new self($file); } $same = $this->getAbsolutePath() === $file->getAbsolutePath(); return $same; }