blob: 7a58229fb311a500bfed4400cc7a72cb9250bdd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include "filesystem/custody.hpp"
#include "kapi/system.hpp"
#include "filesystem/inode.hpp"
#include <kstd/memory>
namespace filesystem
{
custody::custody(kstd::shared_ptr<custody> parent, kstd::shared_ptr<inode> node)
: m_parent(parent)
, m_inode(node)
{
if (!m_inode)
{
kapi::system::panic("[FILESYSTEM] custody constructed with null inode.");
}
}
auto custody::get_inode() const -> kstd::shared_ptr<inode>
{
return m_inode;
}
auto custody::get_parent() const -> kstd::shared_ptr<custody>
{
return m_parent;
}
} // namespace filesystem
|