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

Method Create

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

Source from the content-addressed store, hash-verified

615MemoryMappedFile::~MemoryMappedFile() { internal::CloseFromDestructor(this); }
616
617Result<std::shared_ptr<MemoryMappedFile>> MemoryMappedFile::Create(
618 const std::string& path, int64_t size) {
619 ARROW_ASSIGN_OR_RAISE(auto file, FileOutputStream::Open(path));
620 RETURN_NOT_OK(::arrow::internal::FileTruncate(file->file_descriptor(), size));
621 RETURN_NOT_OK(file->Close());
622 return MemoryMappedFile::Open(path, FileMode::READWRITE);
623}
624
625Result<std::shared_ptr<MemoryMappedFile>> MemoryMappedFile::Open(const std::string& path,
626 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