From fc55f0d69d24fb4908cbd811681f2c3fac53614d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 31 Jan 2024 09:42:54 +0100 Subject: kernel: add GKit, improve AMD64 HAL. Signed-off-by: Amlal El Mahrouss --- Public/Kits/SystemKit/FileAPI.hxx | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Public/Kits/SystemKit/FileAPI.hxx (limited to 'Public/Kits/SystemKit/FileAPI.hxx') diff --git a/Public/Kits/SystemKit/FileAPI.hxx b/Public/Kits/SystemKit/FileAPI.hxx new file mode 100644 index 00000000..c55d26ff --- /dev/null +++ b/Public/Kits/SystemKit/FileAPI.hxx @@ -0,0 +1,40 @@ +/* + * ======================================================== + * + * h-core + * Copyright Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +#ifndef _SYSTEM_KIT_HCORE_FILE_HPP +#define _SYSTEM_KIT_HCORE_FILE_HPP + +#include +#include + +using namespace HCore; + +class HFile final { + public: + explicit HFile(const char *path); + ~HFile(); + + public: + HCORE_COPY_DEFAULT(HFile); + + public: + void *Read(SizeT off, SizeT sz); + void Write(void *buf, SizeT off, SizeT sz); + void Seek(SizeT off); + void *Read(SizeT sz); + void Write(void *buf, SizeT sz); + void Rewind(); + + public: + void SetMIME(const char *mime); +}; + +typedef HFile *HFilePtr; + +#endif // ifndef _SYSTEM_KIT_HCORE_FILE_HPP -- cgit v1.2.3