| 860 | } |
| 861 | |
| 862 | arrow::Status |
| 863 | Seek(int64_t position) override |
| 864 | { |
| 865 | if (!G_IS_SEEKABLE(input_stream_)) { |
| 866 | std::string message("[gio-input-stream][seek] " |
| 867 | "not seekable input stream: <"); |
| 868 | message += G_OBJECT_CLASS_NAME(G_OBJECT_GET_CLASS(input_stream_)); |
| 869 | message += ">"; |
| 870 | return arrow::Status::NotImplemented(message); |
| 871 | } |
| 872 | |
| 873 | std::lock_guard<std::mutex> guard(lock_); |
| 874 | GError *error = NULL; |
| 875 | if (g_seekable_seek(G_SEEKABLE(input_stream_), |
| 876 | position, |
| 877 | G_SEEK_SET, |
| 878 | NULL, |
| 879 | &error)) { |
| 880 | return arrow::Status::OK(); |
| 881 | } else { |
| 882 | return garrow_error_to_status(error, |
| 883 | arrow::StatusCode::IOError, |
| 884 | "[gio-input-stream][seek]"); |
| 885 | } |
| 886 | } |
| 887 | |
| 888 | arrow::Result<int64_t> |
| 889 | GetSize() override |
nothing calls this directly
no test coverage detected