| 3381 | } |
| 3382 | |
| 3383 | Result<std::shared_ptr<io::OutputStream>> S3FileSystem::OpenOutputStream( |
| 3384 | const std::string& s, const std::shared_ptr<const KeyValueMetadata>& metadata) { |
| 3385 | ARROW_RETURN_NOT_OK(internal::AssertNoTrailingSlash(s)); |
| 3386 | ARROW_ASSIGN_OR_RAISE(auto path, S3Path::FromString(s)); |
| 3387 | RETURN_NOT_OK(ValidateFilePath(path)); |
| 3388 | |
| 3389 | RETURN_NOT_OK(CheckS3Initialized()); |
| 3390 | |
| 3391 | auto ptr = std::make_shared<ObjectOutputStream>(impl_->holder_, io_context(), path, |
| 3392 | impl_->options(), metadata); |
| 3393 | RETURN_NOT_OK(ptr->Init()); |
| 3394 | return ptr; |
| 3395 | } |
| 3396 | |
| 3397 | Result<std::shared_ptr<io::OutputStream>> S3FileSystem::OpenAppendStream( |
| 3398 | const std::string& path, const std::shared_ptr<const KeyValueMetadata>& metadata) { |