In order to implement ResourcePath.from_file_path() and Resource_path.file_path(), we internally keep a list of ResourceRoot objects. Exposing these roots could allow users to answer various tricky questions about resources:
Is a given resource from a zipped or unzipped package?
Does a given resource have overrides?
When was a given resource last modified?
This functionality could be useful for packages like OverrideAudit. In addition, it could be used to implement resource caching (#24): a resource must be reloaded if either the modification time or the resource root has changed.
As a first thought, a resource root could support the following operations:
In order to implement
ResourcePath.from_file_path()
andResource_path.file_path()
, we internally keep a list ofResourceRoot
objects. Exposing these roots could allow users to answer various tricky questions about resources:This functionality could be useful for packages like OverrideAudit. In addition, it could be used to implement resource caching (#24): a resource must be reloaded if either the modification time or the resource root has changed.
As a first thought, a resource root could support the following operations:
The following operation would be provided at the ResourcePath level (or perhaps in a new class?):