SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::File Class Reference

#include <File.hpp>

Public Member Functions

 File ()
 ~File ()
void Close ()
bool Open (const std::string &filename, const std::string &mode)
std::vector< unsigned char > ReadAllBytes ()
std::string ReadAllText ()
bool WriteAllBytes (const std::vector< unsigned char > &data)
bool WriteAllText (const std::string &content)

Static Public Member Functions

static bool Exists (const std::string &filename)

Detailed Description

Thin wrapper over std::fstream for text/binary file I/O.

Definition at line 12 of file File.hpp.

Constructor & Destructor Documentation

◆ File()

Sleak::File::File ( )

Definition at line 14 of file File.cpp.

◆ ~File()

Sleak::File::~File ( )

Definition at line 16 of file File.cpp.

Member Function Documentation

◆ Close()

void Sleak::File::Close ( )

Definition at line 43 of file File.cpp.

◆ Exists()

bool Sleak::File::Exists ( const std::string & filename)
static

Definition at line 97 of file File.cpp.

◆ Open()

bool Sleak::File::Open ( const std::string & filename,
const std::string & mode )

Definition at line 20 of file File.cpp.

◆ ReadAllBytes()

std::vector< unsigned char > Sleak::File::ReadAllBytes ( )

Definition at line 60 of file File.cpp.

◆ ReadAllText()

std::string Sleak::File::ReadAllText ( )

Definition at line 49 of file File.cpp.

◆ WriteAllBytes()

bool Sleak::File::WriteAllBytes ( const std::vector< unsigned char > & data)

Definition at line 87 of file File.cpp.

◆ WriteAllText()

bool Sleak::File::WriteAllText ( const std::string & content)

Definition at line 77 of file File.cpp.