| 672 | } //namespace |
| 673 | |
| 674 | Error 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 | |
| 685 | Error 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()); |
nothing calls this directly
no test coverage detected