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

Method Write

cpp/src/arrow/filesystem/gcsfs.cc:220–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 bool closed() const override { return closed_ || !stream_.IsOpen(); }
219
220 Status Write(const void* data, int64_t nbytes) override {
221 if (closed()) return Status::Invalid("Cannot write to a closed stream");
222 if (stream_.write(reinterpret_cast<const char*>(data), nbytes)) {
223 tell_ += nbytes;
224 return Status::OK();
225 }
226 return internal::ToArrowStatus(stream_.last_status());
227 }
228
229 Status Flush() override {
230 if (closed()) return Status::Invalid("Cannot flush a closed stream");

Callers 15

TestOpenOutputStreamMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
WriteStringMethod · 0.45
TEST_FFunction · 0.45
CreateFileFunction · 0.45
TestOpenOutputStreamMethod · 0.45
test_util.ccFile · 0.45

Calls 5

closedFunction · 0.85
ToArrowStatusFunction · 0.70
InvalidFunction · 0.50
OKFunction · 0.50
writeMethod · 0.45

Tested by 15

TestOpenOutputStreamMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
WriteStringMethod · 0.36
TEST_FFunction · 0.36
CreateFileFunction · 0.36
TestOpenOutputStreamMethod · 0.36
TYPED_TESTFunction · 0.36