AuroraRuntime/Source/IO/FS/FileStream.NT.hpp
Reece Wilson eda8d4255d [+] IProcessSectionMapView
[+] IProcessSectionView (downgraded bc NT)
2022-08-10 10:50:49 +01:00

38 lines
975 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: FileStream.NT.hpp
Date: 2021-6-12
Author: Reece
***/
#pragma once
#if !defined(_AURUNTIME_GENERICFILESTREAM)
namespace Aurora::IO::FS
{
struct WinFileStream : IFileStream
{
~WinFileStream();
void Init(HANDLE handle, const AuString &path);
AuUInt64 GetOffset() override;
bool SetOffset(AuUInt64 offset) override;
AuUInt64 GetLength() override;
bool Read(const Memory::MemoryViewStreamWrite &parameters) override;
bool Write(const Memory::MemoryViewStreamRead & parameters) override;
void Close() override;
void Flush() override;
void WriteEoS() override;
void MakeTemporary() override;
HANDLE GetHandle();
private:
bool bShouldDelete {};
HANDLE handle_ = INVALID_HANDLE_VALUE;
AuString path_;
};
}
#endif