-
Couldn't load subscription status.
- Fork 100
Description
We need a way to support users who leveraged the base_path method of reading Ingredients and manifests. The new API allows adding resources into a memory map so that they can be read, but the existing ingredient..json and manifest.json files have resource references that are difficult to process without this feature. There is already a supported base_path field in the Builder, but we have not made it accessible from other languages. This would add a setter to the builder called set_resource_dir(). If this is set, resources that are not found in memory will be searched for in the given directory.
Builder should not write files to that folder if add_resource is used, added resources should go into memory unless archived. In memory resources are preferred when reading and always used when writing.
*This is a change in current behavior.
This api should also be exposed in the c2pa_c_ffi crate. Then we will need to update other crates that that use it, starting with c2pa-c for c++.
I see this as a temporary feature because in the long run I'd like to have a add_resource_resolver() method and you could add a resolver for any number of different systems, not just files.