#include
#ifdef __linux__
#include "MmapFile.linux.cpp"
#else
#error Invalid platform
#endif
namespace lightningbolt {
MmapFile::MmapFile() : impl(std::make_unique()) {
}
MmapFile::~MmapFile() = default;
ErrorOr MmapFile::Open(const fs::path& path) {
return impl->Open(path);
}
void MmapFile::Close() {
return impl->Close();
}
u8* MmapFile::GetMapping() const {
return impl->GetMapping();
}
usize MmapFile::GetMappingSize() const {
return impl->GetMappingSize();
}
} // namespace lightningbolt