#pragma once #include #include "rapidjson/document.h" namespace khofmann { /// /// Read a file and return file contents /// /// Path of BASE64 encoded File /// Allocator /// File contents rapidjson::Value readFile(const char* path, rapidjson::Document::AllocatorType& alloc); /// /// Write a file to disk /// /// Path to file /// Contents of file /// Length of contents void writeFile(const char* path, rapidjson::Value& contents); /// /// Enumerate a directory and return list of directories. /// Return tumbnail as BASE64 and page count if present. /// /// Path of directory /// Pointer to files value object /// Allocator void enumerateDir(const char* path, rapidjson::Value& files, rapidjson::Document::AllocatorType& alloc); }