mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
Kernel: Split the ProcFS core file into smaller components
This commit is contained in:
parent
e882b2ed05
commit
3906dd3aa3
30 changed files with 1080 additions and 822 deletions
28
Kernel/FileSystem/ProcFS/DirectoryInode.h
Normal file
28
Kernel/FileSystem/ProcFS/DirectoryInode.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/FileSystem/ProcFS/GlobalInode.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class ProcFSDirectoryInode final : public ProcFSGlobalInode {
|
||||
friend class ProcFS;
|
||||
|
||||
public:
|
||||
static ErrorOr<NonnullLockRefPtr<ProcFSDirectoryInode>> try_create(ProcFS const&, ProcFSExposedComponent const&);
|
||||
virtual ~ProcFSDirectoryInode() override;
|
||||
|
||||
protected:
|
||||
ProcFSDirectoryInode(ProcFS const&, ProcFSExposedComponent 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