| 299 | } |
| 300 | |
| 301 | arrow::Status WriteBase(const void* data, int64_t nbytes) { |
| 302 | if (closed()) { |
| 303 | return arrow::Status::IOError("R connection is closed"); |
| 304 | } |
| 305 | |
| 306 | return SafeCallIntoRVoid( |
| 307 | [&]() { |
| 308 | cpp11::writable::raws data_raw(nbytes); |
| 309 | memcpy(cpp11::safe[RAW](data_raw), data, nbytes); |
| 310 | |
| 311 | cpp11::function write_bin = cpp11::package("base")["writeBin"]; |
| 312 | write_bin(data_raw, connection_sexp_); |
| 313 | bytes_written_ += nbytes; |
| 314 | }, |
| 315 | "writeBin() on R connection"); |
| 316 | } |
| 317 | |
| 318 | arrow::Status SeekBase(int64_t pos) { |
| 319 | if (closed()) { |
nothing calls this directly
no test coverage detected