1 #ifndef BLANK_IO_WORLDSAVE_HPP_
2 #define BLANK_IO_WORLDSAVE_HPP_
4 #include "../world/Chunk.hpp"
5 #include "../world/World.hpp"
16 explicit WorldSave(const std::string &path);
20 bool Exists() const noexcept;
21 void Read(World::Config &) const;
22 void Write(const World::Config &) const;
25 bool Exists(const Chunk::Pos &) const noexcept;
26 void Read(Chunk &) const;
27 void Write(Chunk &) const;
29 const char *ChunkPath(const Chunk::Pos &) const;
32 std::string root_path;
33 std::string conf_path;
34 std::string chunk_path;
35 std::size_t chunk_bufsiz;
36 std::unique_ptr<char[]> chunk_buf;