#pragma once #include #include #include #include namespace gsr { struct KeyValue { std::string_view key; std::string_view value; }; using StringSplitCallback = std::function; void string_split_char(std::string_view str, char delimiter, StringSplitCallback callback_func); std::string get_home_dir(); std::string get_config_dir(); // Whoever designed xdg-user-dirs is retarded. Why are some XDG variables environment variables // while others are in this pseudo shell config file ~/.config/user-dirs.dirs std::map get_xdg_variables(); std::string get_videos_dir(); int create_directory_recursive(char *path); bool file_get_content(const char *filepath, std::string &file_content); }