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

Function cbm_download_to_file

src/cli/cli.c:7229–7242  ·  view source on GitHub ↗

Download primitives: update was their only caller. */

Source from the content-addressed store, hash-verified

7227
7228/* Download primitives: update was their only caller. */
7229static int cbm_download_to_file(const char *url, const char *dest) {
7230 const char *protocol = cli_download_protocol(url);
7231 if (!protocol || !dest) {
7232 (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is "
7233 "reserved for an explicit CBM_DOWNLOAD_URL test "
7234 "override)\n");
7235 return CLI_TRUE;
7236 }
7237 const char *argv[] = {"curl", "-fSL", "--progress-bar",
7238 "--proto", protocol, "--proto-redir",
7239 protocol, "-o", dest,
7240 url, NULL};
7241 return cbm_exec_no_shell(argv);
7242}
7243
7244static int cbm_download_to_file_quiet(const char *url, const char *dest) {
7245 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