MCPcopy Create free account
hub / github.com/apache/arrow / check_closed

Method check_closed

r/src/io.cpp:336–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334 int64_t bytes_read_;
335
336 bool check_closed() {
337 if (closed_) {
338 return true;
339 }
340
341 auto is_open_result = SafeCallIntoR<bool>(
342 [&]() {
343 cpp11::sexp result = cpp11::package("base")["isOpen"](connection_sexp_);
344 return cpp11::as_cpp<bool>(result);
345 },
346 "isOpen() on R connection");
347
348 if (!is_open_result.ok()) {
349 closed_ = true;
350 } else {
351 closed_ = !is_open_result.ValueUnsafe();
352 }
353
354 return closed_;
355 }
356
357 bool check_seekable() {
358 auto is_seekable_result = SafeCallIntoR<bool>([&] {

Callers

nothing calls this directly

Calls 2

ValueUnsafeMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected