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

Function cbm_download_to_file

src/cli/cli.c:8107–8120  ·  view source on GitHub ↗

Download primitives: update was their only caller. */

Source from the content-addressed store, hash-verified

8105
8106/* Download primitives: update was their only caller. */
8107static int cbm_download_to_file(const char *url, const char *dest) {
8108 const char *protocol = cli_download_protocol(url);
8109 if (!protocol || !dest) {
8110 (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is "
8111 "reserved for an explicit CBM_DOWNLOAD_URL test "
8112 "override)\n");
8113 return CLI_TRUE;
8114 }
8115 const char *argv[] = {"curl", "-fSL", "--progress-bar",
8116 "--proto", protocol, "--proto-redir",
8117 protocol, "-o", dest,
8118 url, NULL};
8119 return cbm_exec_no_shell(argv);
8120}
8121
8122static int cbm_download_to_file_quiet(const char *url, const char *dest) {
8123 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