Supported Versions: PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL hash >= 1.1
Generate a hash value using the contents of a given file
<?php hash_file(    string $algo,    string $filename,    bool $binary = false,    array $options = []): string|false
<?php         if ($this->isEnabled()) {

            $file = Preg::replace('{[^'.$this->allowlist.']}i', '-', $file);

            if (file_exists($this->root . $file)) {

                return hash_file('sha256', $this->root . $file);

            }

        }
<?php         $script = $tmpFile.'.vbs';

        rename($tmpFile, $script);



        $checksum = hash_file('sha256', $newFilename);




        $source = str_replace('/', '\\', $newFilename);
<?php         @unlink($script);




        if ($result = Filesystem::isReadable($localFilename) && (hash_file('sha256', $localFilename) === $checksum)) {

            $io->writeError('<info>Operation succeeded.</info>');

            @unlink($newFilename);

        } else {
<?php                         .' directory is writable and you have internet connectivity');

                }



                if ($checksum && hash_file('sha1', $fileName) !== $checksum) {

                    throw new \UnexpectedValueException('The checksum verification of the file failed (downloaded from '.$url['base'].')');

                }