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

Method Seek

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

Source from the content-addressed store, hash-verified

90 }
91
92 Status Seek(int64_t position, int whence) {
93 RETURN_NOT_OK(CheckClosed());
94
95 // NOTE: `long long` is at least 64 bits in the C standard, the cast below is
96 // therefore safe.
97
98 // whence: 0 for relative to start of file, 2 for end of file
99 PyObject* result = cpp_PyObject_CallMethod(file_.obj(), "seek", "(Li)",
100 static_cast<long long>(position), whence);
101 Py_XDECREF(result);
102 PY_RETURN_IF_ERROR(StatusCode::IOError);
103 return Status::OK();
104 }
105
106 Status Read(int64_t nbytes, PyObject** out) {
107 RETURN_NOT_OK(CheckClosed());

Callers

nothing calls this directly

Calls 3

cpp_PyObject_CallMethodFunction · 0.85
CheckClosedFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected