diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-08 12:32:41 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-08 12:32:41 +0200 |
| commit | 09dd11ddf800898c00ecb04a65fb5cd10fb481fa (patch) | |
| tree | eda0b4e23d6a71da7de3a78f0bb76ec3201dd2f9 /NewKernel/FSKit/IndexableProperty.hxx | |
| parent | ca83108fd138cc0398f900e6a6c0a53ad51aee31 (diff) | |
MHR-23: :boom: changes, reworked project tree.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'NewKernel/FSKit/IndexableProperty.hxx')
| -rw-r--r-- | NewKernel/FSKit/IndexableProperty.hxx | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/NewKernel/FSKit/IndexableProperty.hxx b/NewKernel/FSKit/IndexableProperty.hxx new file mode 100644 index 00000000..5c3f2015 --- /dev/null +++ b/NewKernel/FSKit/IndexableProperty.hxx @@ -0,0 +1,58 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#pragma once + +#include <CFKit/Property.hpp> +#include <CompilerKit/CompilerKit.hxx> +#include <KernelKit/DriveManager.hxx> + +#define kIndexerNodeNameLength 256 +#define kIndexerClaimed 0xCF + +namespace NewOS +{ + namespace Indexer + { + struct IndexProperty final + { + public: + Char Drive[kDriveNameLen]; + Char Path[kIndexerNodeNameLength]; + }; + + class IndexableProperty final : public Property + { + public: + explicit IndexableProperty() + : Property(StringBuilder::Construct("IndexableProperty").Leak().Leak()) + { + } + ~IndexableProperty() override = default; + + NEWOS_COPY_DEFAULT(IndexableProperty); + + public: + IndexProperty& LeakProperty() noexcept; + + public: + void AddFlag(Int16 flag); + void RemoveFlag(Int16 flag); + Int16 HasFlag(Int16 flag); + + private: + IndexProperty fIndex; + UInt32 fFlags; + }; + + /// @brief Index a file into the indexer instance. + /// @param filename path + /// @param filenameLen used bytes in path. + /// @param indexer the filesystem indexer. + /// @return none. + Void fs_index_file(const Char* filename, SizeT filenameLen, IndexableProperty& indexer); + } // namespace Indexer +} // namespace NewOS |
