MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / wget_sync

Method wget_sync

utility/common.cpp:674–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672} //namespace
673
674Error gdre::wget_sync(const String &p_url, Vector<uint8_t> &response, int retries, const Vector<String> &extra_headers, float *p_progress, bool *p_cancelled) {
675 Ref<FileAccessBuffer> fa = FileAccessBuffer::create(FileAccessBuffer::RESIZE_STRICT);
676 int64_t size = 0;
677 Error err = _wget_sync(p_url, fa, retries, extra_headers, p_progress, p_cancelled, &size);
678 if (err) {
679 return err;
680 }
681 response = fa->get_data();
682 return OK;
683}
684
685Error gdre::download_file_sync(const String &p_url, const String &output_path, float *p_progress, bool *p_cancelled, int64_t *r_size) {
686 Error dir_err = ensure_dir(output_path.get_base_dir());

Callers

nothing calls this directly

Calls 3

createFunction · 0.85
_wget_syncFunction · 0.85
get_dataMethod · 0.45

Tested by

no test coverage detected