nw::Erf
-
struct Erf : public nw::Container
Public Functions
-
Erf() = default
-
explicit Erf(const std::filesystem::path &path)
-
virtual ~Erf() = default
-
bool add(const std::filesystem::path &path)
Adds resources from path.
-
bool reload()
Reloads Erf
Note
Erf::working_directory() will not change
-
bool save() const
Saves Erf to Erf::path()
Note
It’s probably best to call Erf::reload after save.
-
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.
-
Erf() = default