1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

Kernel: Move UnveilNode.h into Kernel/FileSystem/

This commit is contained in:
Andreas Kling 2021-08-06 14:11:45 +02:00
parent 208147c77c
commit 44da58c0b2
3 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <AK/Trie.h>
namespace Kernel {
enum UnveilAccess {
Read = 1,
Write = 2,
Execute = 4,
CreateOrRemove = 8,
Browse = 16,
None = 0,
};
struct UnveilNode;
struct UnveilMetadata {
String full_path;
UnveilAccess permissions { None };
bool explicitly_unveiled { false };
};
struct UnveilNode final : public Trie<String, UnveilMetadata, Traits<String>, UnveilNode> {
using Trie<String, UnveilMetadata, Traits<String>, UnveilNode>::Trie;
bool was_explicitly_unveiled() const { return this->metadata_value().explicitly_unveiled; }
UnveilAccess permissions() const { return this->metadata_value().permissions; }
const String& path() const { return this->metadata_value().full_path; }
};
}