public function validate(&$errors)
    {
        $errLen = count($errors);

        // That the manifest file does exist;
        if (! file_exists($this->fileName)) {
            $basename = basename($this->fileName);
            array_push(
                $errors,
                array($basename, "$basename does not exist.")
            );
            // There's no manifest file, so we might as well bail now.
            return false;
        }

        // That the files in the hash mapping do exist; and
        // That the hashes in the mapping are correct.
        foreach ($this->data as $fileName => $hash) {
            $fullPath = $this->pathPrefix . $fileName;
            if (! file_exists($fullPath)) {
                array_push(
                    $errors,
                    array($fileName, 'Missing data file.')
                );
            } else if ($this->calculateHash($fullPath) != $hash) {
                array_push(
                    $errors,
                    array($fileName, 'Checksum mismatch.')
                );
            }
        }

        return ($errLen == count($errors));
    }