public static function get(string $file, bool $guess = true): string
    {
        if($guess === true) {
            $extension = pathinfo($file, PATHINFO_EXTENSION);
            if(isset(self::$defaultMime[$extension])) {
                return self::$defaultMime[$extension];
            }
        }

        // Get mime using the file information functions
        $info = finfo_open(FILEINFO_MIME_TYPE);
        $mime = finfo_file($info, $file);
        finfo_close($info);

        if(false === $mime){
            $mime = 'application/octet-stream';
        }

        return $mime;
    }