Archive
The Archive class provides functionality for managing and accessing archive files. It allows opening and closing archives from various sources, including file names, strings, and streams. The class provides methods for retrieving metadata about files within the archive, such as file names, sizes, and modification times. Additionally, it supports searching for specific files by name or index and enables accessing files within the archive through a stream interface for reading.
#include <format/TellusimArchive.h>
Constructors
Archive()
Methods
Open/close archive.
bool open(const char *name, const char *type = nullptr)
bool open(const String &name, const char *type = nullptr)
bool open(Stream &stream, const char *type = nullptr)
void close()
Archive status.
bool isOpened() const
String getName() const
Files list.
uint32_t getNumFiles() const
String getFileName(uint32_t index) const
uint64_t getFileMTime(uint32_t index) const
size_t getFileSize(uint32_t index) const
Find file.
uint32_t findFile(const char *name) const
uint32_t findFile(const String &name) const
bool isFile(const char *name) const
bool isFile(const String &name) const
Open file.
Stream openFile(const char *name) const
Stream openFile(const String &name) const
Stream openFile(uint32_t index) const