mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
FileDescriptor is getting out of control, and the layering isn't quite right so let's make a File class that everything can inherit from. Then we can stop worrying about all kinds of specifics in FileDescriptor.
31 lines
442 B
C++
31 lines
442 B
C++
#include <Kernel/File.h>
|
|
#include <Kernel/FileSystem/FileDescriptor.h>
|
|
|
|
File::File()
|
|
{
|
|
}
|
|
|
|
File::~File()
|
|
{
|
|
}
|
|
|
|
KResultOr<Retained<FileDescriptor>> File::open(int options)
|
|
{
|
|
UNUSED_PARAM(options);
|
|
return FileDescriptor::create(this);
|
|
}
|
|
|
|
void File::close()
|
|
{
|
|
}
|
|
|
|
int File::ioctl(Process&, unsigned, unsigned)
|
|
{
|
|
return -ENOTTY;
|
|
}
|
|
|
|
KResultOr<Region*> File::mmap(Process&, LinearAddress, size_t, size_t)
|
|
{
|
|
return KResult(-ENODEV);
|
|
}
|
|
|