linux-wallpaperengine/wallpaperengine/fs/utils.h
Alexis Maiquez Murcia 9f9d44834b - Removed the whole "fileResolver" class in favour of using the actual irrlicht file-handling functions
~ 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>
2019-04-04 16:51:54 +02:00

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