mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:47:35 +00:00
Kernel: Add InodeFile, a File subclass for regular files.
Finally everything that can be held by a FileDescriptor actually inherits from the File class.
This commit is contained in:
parent
66c1a9be3b
commit
08926e59b3
9 changed files with 151 additions and 133 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <AK/Types.h>
|
||||
#include <Kernel/KResult.h>
|
||||
#include <Kernel/LinearAddress.h>
|
||||
#include <Kernel/UnixTypes.h>
|
||||
|
||||
class FileDescriptor;
|
||||
class Process;
|
||||
|
@ -28,10 +29,13 @@ public:
|
|||
|
||||
virtual String absolute_path(FileDescriptor&) const = 0;
|
||||
|
||||
virtual KResult truncate(off_t) { return KResult(-EINVAL); }
|
||||
|
||||
virtual const char* class_name() const = 0;
|
||||
|
||||
virtual bool is_seekable() const { return false; }
|
||||
|
||||
virtual bool is_inode() const { return false; }
|
||||
virtual bool is_shared_memory() const { return false; }
|
||||
virtual bool is_fifo() const { return false; }
|
||||
virtual bool is_device() const { return false; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue