| 3448 | } |
| 3449 | |
| 3450 | Result<std::shared_ptr<io::OutputStream>> S3FileSystem::OpenOutputStream( |
| 3451 | const std::string& s, const std::shared_ptr<const KeyValueMetadata>& metadata) { |
| 3452 | ARROW_RETURN_NOT_OK(internal::AssertNoTrailingSlash(s)); |
| 3453 | ARROW_ASSIGN_OR_RAISE(auto path, S3Path::FromString(s)); |
| 3454 | RETURN_NOT_OK(ValidateFilePath(path)); |
| 3455 | |
| 3456 | RETURN_NOT_OK(CheckS3Initialized()); |
| 3457 | |
| 3458 | auto ptr = std::make_shared<ObjectOutputStream>(impl_->holder_, io_context(), path, |
| 3459 | impl_->options(), metadata); |
| 3460 | RETURN_NOT_OK(ptr->Init()); |
| 3461 | return ptr; |
| 3462 | } |
| 3463 | |
| 3464 | Result<std::shared_ptr<io::OutputStream>> S3FileSystem::OpenAppendStream( |
| 3465 | const std::string& path, const std::shared_ptr<const KeyValueMetadata>& metadata) { |