mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
binary json format introduced + specification
This commit is contained in:
parent
faa581a928
commit
3837cdcf95
13 changed files with 649 additions and 326 deletions
|
|
@ -7,6 +7,8 @@
|
|||
#include <filesystem>
|
||||
#include "../typedefs.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace json {
|
||||
class JObject;
|
||||
}
|
||||
|
|
@ -25,14 +27,18 @@ namespace files {
|
|||
};
|
||||
|
||||
|
||||
extern bool write_bytes(std::filesystem::path, const char* data, size_t size);
|
||||
extern uint append_bytes(std::filesystem::path, const char* data, size_t size);
|
||||
extern bool read(std::filesystem::path, char* data, size_t size);
|
||||
extern char* read_bytes(std::filesystem::path, size_t& length);
|
||||
extern std::string read_string(std::filesystem::path filename);
|
||||
extern bool write_string(std::filesystem::path filename, const std::string content);
|
||||
extern json::JObject* read_json(std::filesystem::path file);
|
||||
extern std::vector<std::string> read_list(std::filesystem::path file);
|
||||
extern bool write_bytes(fs::path, const char* data, size_t size);
|
||||
extern uint append_bytes(fs::path, const char* data, size_t size);
|
||||
extern bool write_string(fs::path filename, const std::string content);
|
||||
extern bool write_json(fs::path filename, const json::JObject* obj, bool nice=true);
|
||||
extern bool write_binary_json(fs::path filename, const json::JObject* obj);
|
||||
|
||||
extern bool read(fs::path, char* data, size_t size);
|
||||
extern char* read_bytes(fs::path, size_t& length);
|
||||
extern std::string read_string(fs::path filename);
|
||||
extern json::JObject* read_json(fs::path file);
|
||||
extern json::JObject* read_binary_json(fs::path file);
|
||||
extern std::vector<std::string> read_list(fs::path file);
|
||||
}
|
||||
|
||||
#endif /* FILES_FILES_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue