Hermes 0.7.0
Linux game streaming host
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
13namespace 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
Responsible for file handling functions.
std::string get_parent_directory(const std::string &path)
Get the parent directory of a file or directory.
std::string read_file(const char *path)
Read a file to string.
int write_file(const char *path, const std::string_view &contents)
Writes a file.
bool make_directory(const std::string &path)
Make a directory.