From 61c9b4918ed81a6ad439748f8bcb1c6f9b0cf65e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 22 Sep 2024 18:17:46 +0200 Subject: Save recording status to file to reload it when gsr overlay restarts --- include/Utils.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/Utils.hpp') diff --git a/include/Utils.hpp b/include/Utils.hpp index b18ab8e..8ca38b5 100644 --- a/include/Utils.hpp +++ b/include/Utils.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace gsr { struct KeyValue { @@ -23,10 +24,14 @@ namespace gsr { std::map get_xdg_variables(); std::string get_videos_dir(); + // Returns 0 on success int create_directory_recursive(char *path); bool file_get_content(const char *filepath, std::string &file_content); + bool file_overwrite(const char *filepath, const std::string &data); // Returns the path to the parent directory (ignoring trailing /) // of "." if there is no parent directory and the directory path is relative std::string get_parent_directory(std::string_view directory); + + std::optional get_gsr_runtime_dir(); } \ No newline at end of file -- cgit v1.2.3