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

Method Create

cpp/src/arrow/io/file.cc:625–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623MemoryMappedFile::~MemoryMappedFile() { internal::CloseFromDestructor(this); }
624
625Result<std::shared_ptr<MemoryMappedFile>> MemoryMappedFile::Create(
626 const std::string& path, int64_t size) {
627 ARROW_ASSIGN_OR_RAISE(auto file, FileOutputStream::Open(path));
628 RETURN_NOT_OK(::arrow::internal::FileTruncate(file->file_descriptor(), size));
629 RETURN_NOT_OK(file->Close());
630 return MemoryMappedFile::Open(path, FileMode::READWRITE);
631}
632
633Result<std::shared_ptr<MemoryMappedFile>> MemoryMappedFile::Open(const std::string& path,
634 FileMode::type mode) {

Callers

nothing calls this directly

Calls 3

FileTruncateFunction · 0.85
file_descriptorMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected