AuroraRuntime/Include/Aurora/IO/FS/IAsyncFileStream.hpp

25 lines
630 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IAsyncFileStream.hpp
Date: 2022-2-14
Author: Reece
***/
#pragma once
namespace Aurora::IO
{
struct IAsyncTransaction;
}
namespace Aurora::IO::FS
{
struct IAsyncFileStream
{
virtual AuSPtr<IAsyncTransaction> NewTransaction() = 0;
virtual bool BlockingTruncate(AuUInt64 length) = 0;
virtual bool BlockingRead(AuUInt64 offset, const Memory::MemoryViewStreamWrite &parameters) = 0;
virtual bool BlockingWrite(AuUInt64 offset, const Memory::MemoryViewStreamRead &parameters) = 0;
};
}