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