Skip to content

Engine → Core → file_system.h

vfs::file

Syntax

class CONJURE_API file

Constructors

AccessSignatureDescription
publicfile();

Important

Additional constructor overloads have been deleted.

Destructors

AccessSignatureDescription
publicvirtual ~file();

Functions

Public

read_at

[[nodiscard]] virtual result<usize> read_at(
    u64 offset,
    std::span<std::byte> out) = 0;

Reads up to out.size() bytes starting at offset and returns how many were read, which is fewer than requested only at the end of the file. An offset past the end is OUT_OF_RANGE; an offset equal to the size reads zero bytes.

size

[[nodiscard]] virtual u64 size() const noexcept = 0;

Size of the file in bytes when it was opened.