| 623 | MemoryMappedFile::~MemoryMappedFile() { internal::CloseFromDestructor(this); } |
| 624 | |
| 625 | Result<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 | |
| 633 | Result<std::shared_ptr<MemoryMappedFile>> MemoryMappedFile::Open(const std::string& path, |
| 634 | FileMode::type mode) { |
nothing calls this directly
no test coverage detected