Sunshine latest
Self-hosted game stream host for Moonlight.
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.
Definition file_handler.cpp:14
std::string get_parent_directory(const std::string &path)
Get the parent directory of a file or directory.
Definition file_handler.cpp:15
std::string read_file(const char *path)
Read a file to string.
Definition file_handler.cpp:35
int write_file(const char *path, const std::string_view &contents)
Writes a file.
Definition file_handler.cpp:45
bool make_directory(const std::string &path)
Make a directory.
Definition file_handler.cpp:26