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

Function cbm_download_to_file

src/cli/cli.c:7901–7914  ·  view source on GitHub ↗

Download primitives: update was their only caller. */

Source from the content-addressed store, hash-verified

7899
7900/* Download primitives: update was their only caller. */
7901static int cbm_download_to_file(const char *url, const char *dest) {
7902 const char *protocol = cli_download_protocol(url);
7903 if (!protocol || !dest) {
7904 (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is "
7905 "reserved for an explicit CBM_DOWNLOAD_URL test "
7906 "override)\n");
7907 return CLI_TRUE;
7908 }
7909 const char *argv[] = {"curl", "-fSL", "--progress-bar",
7910 "--proto", protocol, "--proto-redir",
7911 protocol, "-o", dest,
7912 url, NULL};
7913 return cbm_exec_no_shell(argv);
7914}
7915
7916static int cbm_download_to_file_quiet(const char *url, const char *dest) {
7917 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