Hermes
0.7.0
Linux game streaming host
Toggle main menu visibility
Loading...
Searching...
No Matches
file_handler.h
Go to the documentation of this file.
1
5
#pragma once
6
7
// standard includes
8
#include <string>
9
13
namespace
file_handler
{
22
std::string
get_parent_directory
(
const
std::string &path);
23
32
bool
make_directory
(
const
std::string &path);
33
42
std::string
read_file
(
const
char
*path);
43
53
int
write_file
(
const
char
*path,
const
std::string_view &contents);
54
}
// namespace file_handler
file_handler
Responsible for file handling functions.
Definition
file_handler.cpp:14
file_handler::get_parent_directory
std::string get_parent_directory(const std::string &path)
Get the parent directory of a file or directory.
Definition
file_handler.cpp:15
file_handler::read_file
std::string read_file(const char *path)
Read a file to string.
Definition
file_handler.cpp:35
file_handler::write_file
int write_file(const char *path, const std::string_view &contents)
Writes a file.
Definition
file_handler.cpp:45
file_handler::make_directory
bool make_directory(const std::string &path)
Make a directory.
Definition
file_handler.cpp:26
src
file_handler.h
Generated by
1.18.0