oa::MappedFile

Read-only whole-file mapping with RAII ownership. Linux uses mmap. Other platforms retain a read-only owned byte buffer until a native mapping implementation is added.

Public Methods

oa::Span<const oa::U8> oa::MappedFile::bytes()
void oa::MappedFile::close()
const oa::U8 * oa::MappedFile::data()
bool oa::MappedFile::isOpen()
oa::Status oa::MappedFile::openReadOnly(const oa::Path & inPath)
const oa::Path & oa::MappedFile::path()
oa::Usize oa::MappedFile::size()
oa::Result<oa::Span<const oa::U8>> oa::MappedFile::slice(oa::U64 inOffset, oa::U64 inSize)

Constructor & Destructor Documentation

oa::MappedFile::MappedFile()
No public source comment is attached to this declaration.
void oa::MappedFile::~MappedFile()
No public source comment is attached to this declaration.

Public Method Documentation

oa::Span<const oa::U8> oa::MappedFile::bytes()
No public source comment is attached to this declaration.

Returns

oa::Span<const oa::U8>

The declared return value.

void oa::MappedFile::close()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

const oa::U8 * oa::MappedFile::data()
No public source comment is attached to this declaration.

Returns

const oa::U8 *

The declared return value.

bool oa::MappedFile::isOpen()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

oa::Status oa::MappedFile::openReadOnly( const oa::Path & inPath )
No public source comment is attached to this declaration.

Parameters

inPath
const oa::Path &

Returns

oa::Status

The declared return value.

const oa::Path & oa::MappedFile::path()
No public source comment is attached to this declaration.

Returns

const oa::Path &

The declared return value.

oa::Usize oa::MappedFile::size()
No public source comment is attached to this declaration.

Returns

oa::Usize

The declared return value.

oa::Result<oa::Span<const oa::U8>> oa::MappedFile::slice( oa::U64 inOffset, oa::U64 inSize )
No public source comment is attached to this declaration.

Parameters

inOffset
oa::U64

inSize
oa::U64

Returns

oa::Result<oa::Span<const oa::U8>>

The declared return value.