HM\BackUpWordPress\Database_Backup_Engine::verify_backup PHP Method

verify_backup() public method

It's important this function is performant as it's called after every backup.
public verify_backup ( ) : boolean
return boolean Whether the backup completed successfully
    public function verify_backup()
    {
        // If there are errors delete the database dump file
        if ($this->get_errors(get_called_class()) && file_exists($this->get_backup_filepath())) {
            unlink($this->get_backup_filepath());
        }
        // If we have an empty file delete it
        if (@filesize($this->get_backup_filepath()) === 0) {
            unlink($this->get_backup_filepath());
        }
        // If the database backup doesn't exist then the backup must have failed
        if (!file_exists($this->get_backup_filepath())) {
            return false;
        }
        return true;
    }