mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-16 22:32:25 +08:00

~ Added a small utils class to read full files to ram for the purpose of parsing json files Most of these files are really small, so there shouldn't really be any memory concerns + Added support for loading backgrounds directly from PKG files Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
37 lines
700 B
C++
37 lines
700 B
C++
/**
|
|
* @author Alexis Maiquez Murcia <almamu@almamu.com>
|
|
*/
|
|
#ifndef WALLENGINE_RESOLVER_H
|
|
#define WALLENGINE_RESOLVER_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <irrlicht/path.h>
|
|
#include <nlohmann/json.hpp>
|
|
|
|
namespace wp
|
|
{
|
|
using json = nlohmann::json;
|
|
|
|
namespace fs
|
|
{
|
|
/**
|
|
* Custom file resolver to limit our searches to specific folders
|
|
*/
|
|
class utils
|
|
{
|
|
public:
|
|
/**
|
|
* Loads a full file into an std::string
|
|
*
|
|
* @param file
|
|
* @return
|
|
*/
|
|
static std::string loadFullFile (irr::io::path file);
|
|
};
|
|
};
|
|
}
|
|
|
|
|
|
#endif //WALLENGINE_RESOLVER_H
|