public function checkFileValues(FileInfo $file, File $databaseFile) { if ($file->getSize() != $databaseFile->getSize()) { $databaseFile->setSize($file->getSize()); } if ($file->getHash() != $databaseFile->getHash()) { $databaseFile->setHash($file->getHash()); } if ($file->getType() != $databaseFile->getType()) { $databaseFile->setType($file->getType()); } if ($file->getCreatedTime() != $databaseFile->getCreatedTime()) { $databaseFile->setCreatedTime($file->getCreatedTime()); } if ($file->getModifiedTime() != $databaseFile->getModifiedTime()) { $databaseFile->setModifiedTime($file->getModifiedTime()); } }