mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:58:12 +00:00
Kernel: Split the SysFS core files into smaller components
This commit is contained in:
parent
7eed3dab5d
commit
f53149d5f6
19 changed files with 234 additions and 148 deletions
31
Kernel/FileSystem/SysFS/DirectoryInode.h
Normal file
31
Kernel/FileSystem/SysFS/DirectoryInode.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/FileSystem/SysFS/Inode.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class SysFSDirectoryInode : public SysFSInode {
|
||||
friend class SysFS;
|
||||
|
||||
public:
|
||||
static ErrorOr<NonnullLockRefPtr<SysFSDirectoryInode>> try_create(SysFS const&, SysFSComponent const&);
|
||||
virtual ~SysFSDirectoryInode() override;
|
||||
|
||||
SysFS& fs() { return static_cast<SysFS&>(Inode::fs()); }
|
||||
SysFS const& fs() const { return static_cast<SysFS const&>(Inode::fs()); }
|
||||
|
||||
protected:
|
||||
SysFSDirectoryInode(SysFS const&, SysFSComponent const&);
|
||||
// ^Inode
|
||||
virtual InodeMetadata metadata() const override;
|
||||
virtual ErrorOr<void> traverse_as_directory(Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
virtual ErrorOr<NonnullLockRefPtr<Inode>> lookup(StringView name) override;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue