| 168 | } |
| 169 | |
| 170 | Status Write(const void* data, int64_t length) { |
| 171 | RETURN_NOT_OK(CheckClosed()); |
| 172 | |
| 173 | std::lock_guard<std::mutex> guard(lock_); |
| 174 | RETURN_NOT_OK(CheckPositioned()); |
| 175 | if (length < 0) { |
| 176 | return Status::IOError("Length must be non-negative"); |
| 177 | } |
| 178 | return ::arrow::internal::FileWrite(fd_.fd(), reinterpret_cast<const uint8_t*>(data), |
| 179 | length); |
| 180 | } |
| 181 | |
| 182 | int fd() const { return fd_.fd(); } |
| 183 |
nothing calls this directly
no test coverage detected