diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-04-08 16:21:33 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-04-11 07:58:22 +0200 |
| commit | e2c08ddb3d79f946399ca5d3bc07b4e6c4de9328 (patch) | |
| tree | d22d1c86eabd3924ca2e9b960cc8b8afcb5ddccd /kernel/include | |
| parent | 210d55251dc7143da9e099c6fc6b8d0f465d4153 (diff) | |
| download | teachos-e2c08ddb3d79f946399ca5d3bc07b4e6c4de9328.tar.xz teachos-e2c08ddb3d79f946399ca5d3bc07b4e6c4de9328.zip | |
add dentry tests
Diffstat (limited to 'kernel/include')
| -rw-r--r-- | kernel/include/kernel/filesystem/dentry.hpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/kernel/include/kernel/filesystem/dentry.hpp b/kernel/include/kernel/filesystem/dentry.hpp index 72d758f..58a918f 100644 --- a/kernel/include/kernel/filesystem/dentry.hpp +++ b/kernel/include/kernel/filesystem/dentry.hpp @@ -28,10 +28,13 @@ namespace kernel::filesystem }; /** - @brief Create a dentry with the given @p parent, associated @p node, and optional @p name. The dentry is initialized - with the provided parent and inode, and the name is stored for lookup purposes. + @brief Create a dentry with the given @p parent, associated @p inode, and optional @p name. The dentry is + initialized with the provided parent and inode, and the name is stored for lookup purposes. + @param parent The parent dentry. + @param inode The associated inode for this dentry. + @param name The name of the dentry (optional). */ - dentry(kstd::shared_ptr<dentry> const & parent, kstd::shared_ptr<inode> const & node, std::string_view name = {}); + dentry(kstd::shared_ptr<dentry> const & parent, kstd::shared_ptr<inode> const & inode, std::string_view name = {}); /** @brief Get the associated inode. @@ -46,6 +49,12 @@ namespace kernel::filesystem [[nodiscard]] auto get_parent() const -> kstd::shared_ptr<dentry> const &; /** + @brief Get the name of the dentry. + @return The name of the dentry. + */ + [[nodiscard]] auto get_name() const -> std::string_view; + + /** @brief Add a @p child dentry. @param child The child dentry to add. */ |
