diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-27 22:10:15 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-27 22:10:15 +0200 |
| commit | dd6568c64e440fe9d8c75539165377ddbbca3e2c (patch) | |
| tree | a37e126238a4908100b3aaf701c27d183fe68a63 /Private/Source/NewFS+FileManager.cxx | |
| parent | 86a2d7327f84519f525d66a7745554b41dddeb93 (diff) | |
MHR-18: A lot of patches and fixes, big improvements as well.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/NewFS+FileManager.cxx')
| -rw-r--r-- | Private/Source/NewFS+FileManager.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Private/Source/NewFS+FileManager.cxx b/Private/Source/NewFS+FileManager.cxx index 7227c2e2..910ec841 100644 --- a/Private/Source/NewFS+FileManager.cxx +++ b/Private/Source/NewFS+FileManager.cxx @@ -5,6 +5,7 @@ ------------------------------------------- */ #include <KernelKit/FileManager.hpp> +#include <KernelKit/KernelHeap.hpp> #ifdef __FSKIT_NEWFS__ @@ -15,9 +16,14 @@ namespace NewOS { /// @brief C++ constructor NewFilesystemManager::NewFilesystemManager() { MUST_PASS(Detail::fs_init_newfs()); + fImpl = new NewFSParser(); } -NewFilesystemManager::~NewFilesystemManager() = default; +NewFilesystemManager::~NewFilesystemManager() { + if (fImpl) { + delete fImpl; + } +} /// @brief Removes a node from the filesystem. /// @param fileName The filename @@ -53,15 +59,15 @@ NodePtr NewFilesystemManager::CreateAlias(const char* path) { } /// @brief Gets the root directory. -/// @return +/// @return const char* NewFilesystemHelper::Root() { return kNewFSRoot; } /// @brief Gets the up-dir directory. -/// @return +/// @return const char* NewFilesystemHelper::UpDir() { return kNewFSUpDir; } /// @brief Gets the separator character. -/// @return +/// @return const char NewFilesystemHelper::Separator() { return kNewFSSeparator; } } // namespace NewOS |
