TmpMenu/src/services/gta_data/yim_fipackfile.hpp
maybegreat48 97a8c5d60b Add more spoofing options and added clang-format (#1020)
* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
2023-03-01 21:27:15 +00:00

27 lines
779 B
C++

#pragma once
#include <pugixml.hpp>
namespace big
{
using file_contents_callback = std::function<void(const std::unique_ptr<std::uint8_t[]>& file_content, const int data_size)>;
class yim_fipackfile
{
static constexpr auto default_mount_name = "yimM:/";
rage::fiPackfile* rpf;
std::string mount_name;
public:
explicit yim_fipackfile(rage::fiPackfile* rpf, const std::string& mount_name);
static void for_each_fipackfile(std::function<size_t(yim_fipackfile& rpf_wrapper)> cb);
std::vector<std::filesystem::path> get_file_paths(std::string parent = {});
void read_file(const std::filesystem::path& path, file_contents_callback&& cb);
void read_xml_file(const std::filesystem::path& path, std::function<void(pugi::xml_document& doc)> cb);
private:
};
}