summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/Sources/NewFS+FileManager.cxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-08-18 21:39:29 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-08-18 21:39:29 +0200
commitda70596895d8135e08f8caac6978117697b4c021 (patch)
tree2516785b5434df8453687f05dc8dd877438901ab /dev/Kernel/Sources/NewFS+FileManager.cxx
parent005de79004c9d30e64bdee6e14e06f9d47d1f2ab (diff)
[REFACTOR]
Improved project structure. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/Sources/NewFS+FileManager.cxx')
-rw-r--r--dev/Kernel/Sources/NewFS+FileManager.cxx100
1 files changed, 0 insertions, 100 deletions
diff --git a/dev/Kernel/Sources/NewFS+FileManager.cxx b/dev/Kernel/Sources/NewFS+FileManager.cxx
deleted file mode 100644
index f94831cd..00000000
--- a/dev/Kernel/Sources/NewFS+FileManager.cxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -------------------------------------------
-
- Copyright ZKA Technologies.
-
-------------------------------------------- */
-
-#include <KernelKit/FileManager.hxx>
-#include <KernelKit/Heap.hxx>
-
-#ifdef __FSKIT_USE_NEWFS__
-
-/// @brief NewFS File manager.
-/// BUGS: 0
-
-namespace Kernel
-{
- /// @brief C++ constructor
- NewFilesystemManager::NewFilesystemManager()
- {
- MUST_PASS(Detail::fs_init_newfs());
- fImpl = new NewFSParser();
-
- kcout << "newoskrnl: We are done here... (NewFilesystemManager).\r";
- }
-
- NewFilesystemManager::~NewFilesystemManager()
- {
- kcout << "newoskrnl: Destroying it...\r";
-
- if (fImpl)
- {
- delete fImpl;
- }
- }
-
- /// @brief Removes a node from the filesystem.
- /// @param fileName The filename
- /// @return If it was deleted or not.
- bool NewFilesystemManager::Remove(const char* fileName)
- {
- if (fileName == nullptr || *fileName == 0)
- return false;
-
- return fImpl->RemoveCatalog(fileName);
- }
-
- /// @brief Creates a node with the specified.
- /// @param path The filename path.
- /// @return The Node pointer.
- NodePtr NewFilesystemManager::Create(const char* path)
- {
- return node_cast(fImpl->CreateCatalog(path, 0, kNewFSCatalogKindFile));
- }
-
- /// @brief Creates a node with is a directory.
- /// @param path The filename path.
- /// @return The Node pointer.
- NodePtr NewFilesystemManager::CreateDirectory(const char* path)
- {
- return node_cast(fImpl->CreateCatalog(path, 0, kNewFSCatalogKindDir));
- }
-
- /// @brief Creates a node with is a alias.
- /// @param path The filename path.
- /// @return The Node pointer.
- NodePtr NewFilesystemManager::CreateAlias(const char* path)
- {
- return node_cast(fImpl->CreateCatalog(path, 0, kNewFSCatalogKindAlias));
- }
-
- /// @brief Gets the root directory.
- /// @return
- const char* NewFilesystemHelper::Root()
- {
- return kNewFSRoot;
- }
-
- /// @brief Gets the up-dir directory.
- /// @return
- const char* NewFilesystemHelper::UpDir()
- {
- return kNewFSUpDir;
- }
-
- /// @brief Gets the separator character.
- /// @return
- const char NewFilesystemHelper::Separator()
- {
- return kNewFSSeparator;
- }
-
- /// @brief Gets the metafile character.
- /// @return
- const char NewFilesystemHelper::MetaFile()
- {
- return kNewFSMetaFilePrefix;
- }
-} // namespace Kernel
-
-#endif // ifdef __FSKIT_USE_NEWFS__