1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

AK: Add method to create MappedFile from fd

This commit is contained in:
Timothy 2021-08-06 11:47:55 +10:00 committed by Andreas Kling
parent 95ee7069d5
commit bc75ca4fe5
2 changed files with 10 additions and 0 deletions

View file

@ -20,6 +20,7 @@ class MappedFile : public RefCounted<MappedFile> {
public:
static Result<NonnullRefPtr<MappedFile>, OSError> map(const String& path);
static Result<NonnullRefPtr<MappedFile>, OSError> map_from_fd_and_close(int fd, String const& path);
~MappedFile();
void* data() { return m_data; }