| 144 | } |
| 145 | |
| 146 | Status Seek(int64_t pos) { |
| 147 | RETURN_NOT_OK(CheckClosed()); |
| 148 | if (pos < 0) { |
| 149 | return Status::Invalid("Invalid position"); |
| 150 | } |
| 151 | Status st = ::arrow::internal::FileSeek(fd_.fd(), pos); |
| 152 | if (st.ok()) { |
| 153 | need_seeking_.store(false); |
| 154 | } |
| 155 | return st; |
| 156 | } |
| 157 | |
| 158 | Result<int64_t> Tell() const { |
| 159 | RETURN_NOT_OK(CheckClosed()); |