Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Calculate the sha1 hash of a file
<?php sha1_file(string $filename, bool $binary = false): string|false
<?php         if ($this->isEnabled()) {

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

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

                return sha1_file($this->root . $file);

            }

        }
<?php         $package['dist'] = array(

            'type' => $fileType,

            'url' => strtr($file->getPathname(), '\\', '/'),

            'shasum' => sha1_file($file->getRealPath()),

        );



        try {