MCPcopy Create free account
hub / github.com/apache/arrow / OpenInputFile

Method OpenInputFile

cpp/src/arrow/filesystem/gcsfs.cc:925–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

923}
924
925Result<std::shared_ptr<io::RandomAccessFile>> GcsFileSystem::OpenInputFile(
926 const std::string& path) {
927 ARROW_RETURN_NOT_OK(internal::AssertNoTrailingSlash(path));
928 ARROW_ASSIGN_OR_RAISE(auto p, GcsPath::FromString(path));
929 auto metadata = impl_->GetObjectMetadata(p);
930 ARROW_GCS_RETURN_NOT_OK(metadata.status());
931 auto open_stream = [impl = impl_, p](gcs::Generation g, gcs::ReadRange range,
932 gcs::ReadFromOffset offset) {
933 return impl->OpenInputStream(p, g, range, offset);
934 };
935
936 return std::make_shared<GcsRandomAccessFile>(std::move(open_stream),
937 *std::move(metadata));
938}
939
940Result<std::shared_ptr<io::RandomAccessFile>> GcsFileSystem::OpenInputFile(
941 const FileInfo& info) {

Callers

nothing calls this directly

Calls 7

AssertNoTrailingSlashFunction · 0.85
IOErrorFunction · 0.85
GetObjectMetadataMethod · 0.80
statusMethod · 0.45
OpenInputStreamMethod · 0.45
IsDirectoryMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected