mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
Kernel/SysFS: Migrate components code from SysFS.cpp to the SysFS folder
This commit is contained in:
parent
4d05a41b30
commit
23c1c40e86
29 changed files with 496 additions and 286 deletions
27
Kernel/FileSystem/SysFS/RootDirectory.h
Normal file
27
Kernel/FileSystem/SysFS/RootDirectory.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/FileSystem/SysFS/Component.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/Directory.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class SysFSRootDirectory final : public SysFSDirectory {
|
||||
friend class SysFSComponentRegistry;
|
||||
|
||||
public:
|
||||
virtual StringView name() const override { return "."sv; }
|
||||
static NonnullRefPtr<SysFSRootDirectory> create();
|
||||
virtual ErrorOr<void> traverse_as_directory(FileSystemID, Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
|
||||
private:
|
||||
SysFSRootDirectory();
|
||||
RefPtr<SysFSBusDirectory> m_buses_directory;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue