Class File

Class Documentation

class inexor::vulkan_renderer::tools::File

A class for loading files into memory.

Todo:

Refactor into an RAII wrapper.

Public Functions

File() = default
inline std::size_t file_size() const
inline const std::vector<char> &file_data() const
bool load_file(const std::string &file_name)

Load the entire file into memory.

Parameters

file_name – The name of the file.

Returns

true if file was loaded successfully.

Private Members

std::vector<char> m_file_data

The file data.

std::size_t m_file_size = {0}

The size of the file.