diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-04 10:59:24 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-04 10:59:24 +0100 |
| commit | e2bbec91d70847cc5a2ff67eb84ca4a3c2d03e85 (patch) | |
| tree | 1e7fec7c232b0c750157007113ce8f86d43b7e76 /Private/KernelKit/FileManager.hpp | |
| parent | aff54fd3dc6855b62c047f126c6fe20ca717ee0f (diff) | |
Kernel: Depend less on NewFS, add support for FileSystem protocol in
NewBoot.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/KernelKit/FileManager.hpp')
| -rw-r--r-- | Private/KernelKit/FileManager.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Private/KernelKit/FileManager.hpp b/Private/KernelKit/FileManager.hpp index cfd06f07..a52daa7d 100644 --- a/Private/KernelKit/FileManager.hpp +++ b/Private/KernelKit/FileManager.hpp @@ -17,7 +17,10 @@ #pragma once +#ifdef __USE_NEWFS__ #include <FSKit/NewFS.hxx> +#endif // __USE_NEWFS__ + #include <NewKit/ErrorID.hpp> #include <NewKit/Ref.hpp> #include <NewKit/Stream.hpp> @@ -87,6 +90,7 @@ class IFilesystemManager { /** @brief invalid position. (n-pos) */ #define kNPos (SizeT)(-1); +#ifdef __USE_NEWFS__ /** * @brief Based of IFilesystemManager, takes care of managing NewFS disks. */ @@ -148,12 +152,14 @@ class NewFilesystemManager final : public IFilesystemManager { NewFSImplementation *fImpl{nullptr}; }; +#endif // ifdef __USE_NEWFS__ + /** * Usable FileStream * @tparam Encoding file encoding (char, wchar_t...) * @tparam FSClass Filesystem contract who takes care of it. */ -template <typename Encoding = char, typename FSClass = NewFilesystemManager> +template <typename Encoding = char, typename FSClass = IFilesystemManager> class FileStream final { public: explicit FileStream(const Encoding *path); |
