SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
sourcepp::fs Namespace Reference

Functions

std::vector< std::byte > readFileBuffer (const std::filesystem::path &filepath, std::size_t startOffset=0)
std::string readFileText (const std::filesystem::path &filepath, std::size_t startOffset=0)
bool writeFileBuffer (const std::filesystem::path &filepath, std::span< const std::byte > buffer)
bool writeFileText (const std::filesystem::path &filepath, std::string_view text)

Function Documentation

◆ readFileBuffer()

std::vector< std::byte > sourcepp::fs::readFileBuffer ( const std::filesystem::path & filepath,
std::size_t startOffset = 0 )
nodiscard

Definition at line 7 of file FS.cpp.

◆ readFileText()

std::string sourcepp::fs::readFileText ( const std::filesystem::path & filepath,
std::size_t startOffset = 0 )
nodiscard

Definition at line 16 of file FS.cpp.

◆ writeFileBuffer()

bool sourcepp::fs::writeFileBuffer ( const std::filesystem::path & filepath,
std::span< const std::byte > buffer )

Definition at line 25 of file FS.cpp.

◆ writeFileText()

bool sourcepp::fs::writeFileText ( const std::filesystem::path & filepath,
std::string_view text )

Definition at line 34 of file FS.cpp.