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

Function cbm_download_to_file

src/cli/cli.c:6916–6929  ·  view source on GitHub ↗

Download primitives: update was their only caller. */

Source from the content-addressed store, hash-verified

6914
6915/* Download primitives: update was their only caller. */
6916static int cbm_download_to_file(const char *url, const char *dest) {
6917 const char *protocol = cli_download_protocol(url);
6918 if (!protocol || !dest) {
6919 (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is "
6920 "reserved for an explicit CBM_DOWNLOAD_URL test "
6921 "override)\n");
6922 return CLI_TRUE;
6923 }
6924 const char *argv[] = {"curl", "-fSL", "--progress-bar",
6925 "--proto", protocol, "--proto-redir",
6926 protocol, "-o", dest,
6927 url, NULL};
6928 return cbm_exec_no_shell(argv);
6929}
6930
6931static int cbm_download_to_file_quiet(const char *url, const char *dest) {
6932 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