mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
Kernel: Virtualize the File::stat() operation
Instead of FileDescriptor branching on the type of File it's wrapping, add a File::stat() function that can be overridden to provide custom behavior for the stat syscalls.
This commit is contained in:
parent
5444cabd39
commit
22831033d0
Notes:
sideshowbarker
2024-07-19 02:53:06 +09:00
Author: https://github.com/awesomekling
Commit: 22831033d0
6 changed files with 28 additions and 20 deletions
|
@ -59,6 +59,7 @@ private:
|
|||
// ^File
|
||||
virtual KResultOr<size_t> write(FileDescription&, size_t, const u8*, size_t) override;
|
||||
virtual KResultOr<size_t> read(FileDescription&, size_t, u8*, size_t) override;
|
||||
virtual KResult stat(::stat&) const override;
|
||||
virtual bool can_read(const FileDescription&, size_t) const override;
|
||||
virtual bool can_write(const FileDescription&, size_t) const override;
|
||||
virtual String absolute_path(const FileDescription&) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue