| 151 | } |
| 152 | |
| 153 | Status Seek(int64_t pos) { |
| 154 | RETURN_NOT_OK(CheckClosed()); |
| 155 | if (pos < 0) { |
| 156 | return Status::Invalid("Invalid position"); |
| 157 | } |
| 158 | Status st = ::arrow::internal::FileSeek(fd_.fd(), pos); |
| 159 | if (st.ok()) { |
| 160 | need_seeking_.store(false); |
| 161 | } |
| 162 | return st; |
| 163 | } |
| 164 | |
| 165 | Result<int64_t> Tell() const { |
| 166 | RETURN_NOT_OK(CheckClosed()); |