1 #ifndef LIBASSETMAP_MEMMAPPER_H
2 #define LIBASSETMAP_MEMMAPPER_H
4 #include "IMemMapper.h"
11 class FileDescriptor {
15 explicit FileDescriptor(
int fd);
17 FileDescriptor(FileDescriptor&&) noexcept;
19 FileDescriptor& operator=(FileDescriptor&&) noexcept;
21 operator
int() const noexcept;
23 ~FileDescriptor() noexcept;
30 void Close() noexcept;
41 explicit MemMapper(
const std::filesystem::directory_entry& file);
51 [[nodiscard]]
size_t Size() const noexcept override;
66 [[nodiscard]] const uint8_t* Get() const noexcept override;
73 [[nodiscard]] uint8_t* Get() noexcept override;
79 #endif // LIBASSETMAP_MEMMAPPER_H