MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_download_to_file

Function cbm_download_to_file

src/cli/cli.c:6978–6991  ·  view source on GitHub ↗

Download primitives: update was their only caller. */

Source from the content-addressed store, hash-verified

6976
6977/* Download primitives: update was their only caller. */
6978static int cbm_download_to_file(const char *url, const char *dest) {
6979 const char *protocol = cli_download_protocol(url);
6980 if (!protocol || !dest) {
6981 (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is "
6982 "reserved for an explicit CBM_DOWNLOAD_URL test "
6983 "override)\n");
6984 return CLI_TRUE;
6985 }
6986 const char *argv[] = {"curl", "-fSL", "--progress-bar",
6987 "--proto", protocol, "--proto-redir",
6988 protocol, "-o", dest,
6989 url, NULL};
6990 return cbm_exec_no_shell(argv);
6991}
6992
6993static int cbm_download_to_file_quiet(const char *url, const char *dest) {
6994 const char *protocol = cli_download_protocol(url);

Callers 1

download_verify_installFunction · 0.85

Calls 2

cli_download_protocolFunction · 0.85
cbm_exec_no_shellFunction · 0.85

Tested by

no test coverage detected