35 lines
789 B
C++
35 lines
789 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: FileStream.Win32.hpp
|
|
Date: 2021-6-12
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#if !defined(_AURUNTIME_GENERICFILESTREAM)
|
|
|
|
namespace Aurora::IO::FS
|
|
{
|
|
class PosixStream : public IFileStream
|
|
{
|
|
public:
|
|
~PosixStream();
|
|
|
|
void Init(int handle, const AuString &path);
|
|
|
|
AuUInt64 GetOffset() override;
|
|
bool SetOffset(AuUInt64 offset) override;
|
|
AuUInt64 GetLength() override;
|
|
AuUInt64 Read(void *in, AuUInt64 length) override;
|
|
AuUInt64 Write(const void *out, AuUInt64 length) override;
|
|
void Close() override;
|
|
void Flush() override;
|
|
|
|
private:
|
|
|
|
int handle_ = -1;
|
|
AuString path_;
|
|
};
|
|
}
|
|
#endif |