SublimeText / sublime_lib

Utility library for frequently used functionality in Sublime Text and convenience functions or classes
https://sublimetext.github.io/sublime_lib
MIT License
52 stars 4 forks source link

Expose resource roots #125

Open Thom1729 opened 5 years ago

Thom1729 commented 5 years ago

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:

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?):

FichteFoll commented 5 years ago

Good idea, imo.