Deployment\Helpers::hashFile PHP Метод

hashFile() публичный статический Метод

Computes hash.
public static hashFile ( $file ) : string
Результат string
    public static function hashFile($file)
    {
        if (filesize($file) > 5000000.0) {
            return md5_file($file);
        } else {
            $s = file_get_contents($file);
            if (preg_match('#^[\\x09\\x0A\\x0D\\x20-\\x7E\\x80-\\xFF]*+\\z#', $s)) {
                $s = str_replace("\r\n", "\n", $s);
            }
            return md5($s);
        }
    }