summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot/Source/FileReader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Private/NewBoot/Source/FileReader.cxx')
-rw-r--r--Private/NewBoot/Source/FileReader.cxx54
1 files changed, 54 insertions, 0 deletions
diff --git a/Private/NewBoot/Source/FileReader.cxx b/Private/NewBoot/Source/FileReader.cxx
new file mode 100644
index 00000000..39884f9f
--- /dev/null
+++ b/Private/NewBoot/Source/FileReader.cxx
@@ -0,0 +1,54 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+ File: FileReader.cxx
+ Purpose: NewBoot FileReader,
+ Read complete file and store it in a buffer.
+
+ Revision History:
+
+
+
+------------------------------------------- */
+
+#include <BootKit/BootKit.hxx>
+#include <EFIKit/Api.hxx>
+#include <FSKit/NewFS.hxx>
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//
+// @brief BImageReader class
+//
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/***
+ @brief File Reader constructor.
+*/
+BFileReader::BFileReader(const CharacterType *path) {
+ if (path != nullptr) {
+ SizeT index = 0UL;
+ for (; path[index] != L'\0'; ++index) {
+ mPath[index] = path[index];
+ }
+
+ mPath[index] = 0;
+ }
+}
+
+/**
+ @brief this reads all of the buffer.
+ @param size, new buffer size.
+*/
+HCore::VoidPtr BFileReader::Fetch(SizeT &size) {
+ mWriter.WriteString(L"HCoreLdr: Fetch-File: ")
+ .WriteString(mPath)
+ .WriteString(L"\r\n");
+
+ this->mCached = true;
+ this->mErrorCode = kNotSupported;
+
+ return nullptr;
+}