std::vector<char> open_data_file(const string& file_name) {
if (file_name.
size() == 0)
if (!f_info.exists())
std::ifstream f_stream(file_name, std::ios::binary);
std::vector<char> buffer(f_info.size());
f_stream.read(&buffer[0], f_info.size());
return buffer;
}
The exception that is thrown when one of the arguments provided to a method is not valid.
Definition argument_exception.h:23
size_type size() const noexcept
Returns the number of char_t elements in the string, i.e. std::distance(begin(), end()).
Definition basic_string.h:834
Provides static methods for the creation, copying, deletion, moving, and opening of files,...
Definition file_info.h:41
The exception that is thrown when an attempt to access a file that does not exist on disk fails.
Definition file_not_found_exception.h:29
#define csf_
Provides information about the current stack frame.
Definition current_stack_frame.h:30