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

Method GetSize

python/pyarrow/src/arrow/python/io.cc:271–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271Result<int64_t> PyReadableFile::GetSize() {
272 return SafeCallIntoPython([=]() -> Result<int64_t> {
273 ARROW_ASSIGN_OR_RAISE(int64_t current_position, file_->Tell());
274 RETURN_NOT_OK(file_->Seek(0, 2));
275
276 ARROW_ASSIGN_OR_RAISE(int64_t file_size, file_->Tell());
277 // Restore previous file position
278 RETURN_NOT_OK(file_->Seek(current_position, 0));
279
280 return file_size;
281 });
282}
283
284// ----------------------------------------------------------------------
285// Output stream

Callers

nothing calls this directly

Calls 2

SafeCallIntoPythonFunction · 0.85
SeekMethod · 0.45

Tested by

no test coverage detected