28 lines
523 B
C++
28 lines
523 B
C++
#pragma once
|
|
|
|
#include "format/vlc_format.hpp"
|
|
|
|
#include <filesystem>
|
|
#include <string>
|
|
#include <variant>
|
|
|
|
namespace voidlibc::voidlink {
|
|
|
|
struct ReadError {
|
|
std::string message;
|
|
};
|
|
|
|
struct Container {
|
|
voidlibc::format::FileHeader header;
|
|
std::uint64_t actual_file_size = 0;
|
|
std::filesystem::path path;
|
|
};
|
|
|
|
using ReadResult = std::variant<Container, ReadError>;
|
|
|
|
ReadResult read_container(const std::filesystem::path& in_path);
|
|
|
|
void dump_container(const Container& c);
|
|
|
|
} // namespace voidlibc::voidlink
|