ladybird/Kernel/FileSystem/SysFS/RootDirectory.h
Liav A 70afa0b171 Kernel/SysFS: Mark SysFSDirectory traverse and lookup methods as final
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.
2022-07-15 12:29:23 +02:00

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;
};
}