mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 04:15:23 +03:00
70afa0b171
This enforces us to remove duplicated code across the SysFS code. This results in great simplification of how the SysFS works now, because we enforce one way to treat SysFSDirectory objects.
28 lines
642 B
C++
28 lines
642 B
C++
/*
|
|
* 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();
|
|
|
|
private:
|
|
virtual bool is_root_directory() const override final { return true; }
|
|
SysFSRootDirectory();
|
|
RefPtr<SysFSBusDirectory> m_buses_directory;
|
|
};
|
|
|
|
}
|