nw::Zip
-
struct Zip : public nw::Container
Public Functions
-
Zip(const std::filesystem::path &path)
-
~Zip()
-
virtual Vector<ResourceDescriptor> all() const override
Get all resources.
-
virtual ResourceData demand(Resource res) const override
Reads resource data, empty ResourceData if no match.
-
virtual int extract(const std::regex &pattern, const std::filesystem::path &output) const override
Extract elements from a container by regex.
-
inline virtual const String &path() const override
Path to container, for basic containers, should be canonical.
-
virtual size_t size() const override
Determines the size, if applicable, of the container.
-
virtual ResourceDescriptor stat(const Resource &res) const override
Get some general data about a resource.
-
inline virtual bool valid() const noexcept override
Return true if loaded, false if not.
-
virtual void visit(std::function<void(const Resource&)> callback, std::initializer_list<ResourceType::type> types = {}) const noexcept override
Visits all resources in a container.
-
virtual int extract_by_glob(StringView glob, const std::filesystem::path &output) const
Extract elements from a container by glob pattern.
-
const std::filesystem::path &working_directory() const
Get container working directory.
-
Zip(const std::filesystem::path &path)