From f99e383775fa43c5c1354067962b1590ff2abdae Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 3 Feb 2024 20:39:06 +0100 Subject: NewBoot: Will work on AHCI instead, ATA is not getting any further in the future. Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/Source/FileReader.cxx | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Private/NewBoot/Source/FileReader.cxx (limited to 'Private/NewBoot/Source/FileReader.cxx') 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 +#include +#include + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// +// @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; +} -- cgit v1.2.3