mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 14:05:15 +00:00
This allows me to keep prototyping things on a random desktop machine, even if that machine has its own ideas about foo_t types.
24 lines
488 B
C++
24 lines
488 B
C++
#pragma once
|
|
|
|
#include "VirtualFileSystem.h"
|
|
#include <AK/ByteBuffer.h>
|
|
|
|
class FileHandle {
|
|
public:
|
|
explicit FileHandle(RetainPtr<VirtualFileSystem::Node>&&);
|
|
~FileHandle();
|
|
|
|
Unix::off_t seek(Unix::off_t, int whence);
|
|
Unix::ssize_t read(byte* buffer, Unix::size_t count);
|
|
int stat(Unix::stat*);
|
|
|
|
ByteBuffer readEntireFile();
|
|
|
|
private:
|
|
friend class VirtualFileSystem;
|
|
|
|
RetainPtr<VirtualFileSystem::Node> m_vnode;
|
|
|
|
Unix::off_t m_currentOffset { 0 };
|
|
};
|
|
|