Maze Builder Docs 8.2.1
Loading...
Searching...
No Matches
mazes::io_utils Class Reference

Handles file writing for text, stdout, and object files. More...

#include <io_utils.h>

Static Public Member Functions

static bool write (std::ostream &oss, const std::string &data, std::string_view delimiter="\n") noexcept
 Handles writing to an output stream.
 
static bool write_file (const std::string &filename, const std::string &data) noexcept
 Write to a file.
 
static std::string get_full_directory_path (const std::string &filepath) noexcept
 Get the directory path from a full file path.
 

Detailed Description

Handles file writing for text, stdout, and object files.

Member Function Documentation

◆ get_full_directory_path()

static std::string mazes::io_utils::get_full_directory_path ( const std::string & filepath)
staticnoexcept

Get the directory path from a full file path.

Parameters
filepathFull file path
Returns
Directory path

◆ write()

static bool mazes::io_utils::write ( std::ostream & oss,
const std::string & data,
std::string_view delimiter = "\n" )
staticnoexcept

Handles writing to an output stream.

Parameters
oss
data
delimiterDelimiter to use between data entries
Returns
True if the write was successful, false otherwise

◆ write_file()

static bool mazes::io_utils::write_file ( const std::string & filename,
const std::string & data )
staticnoexcept

Write to a file.

Parameters
filenameFull file path
dataData to write
Returns
True if the write was successful, false otherwise

The documentation for this class was generated from the following file: