#include "fs/tmpfs/FileSystem.h" #include namespace TmpFS { Result> FileSystem::create() { SharedPtr root = TRY(make_shared()); SharedPtr fs = TRY(adopt_shared(new (std::nothrow) FileSystem())); root->set_fs(*fs, {}); TRY(fs->set_root(root)); return (SharedPtr)fs; } FileSystem::FileSystem() { } Result FileSystem::set_root(SharedPtr root) { m_root_inode = root; return m_inodes.try_append(root); } Inode::Inode() { } void Inode::set_fs(FileSystem& fs, Badge) { m_fs = &fs; } }