Create High Performance, Trait Driven 'build your own' Tree Mechanism #26
Labels
meta-improvement
An issue that improves an existing feature
points: 2
tech-debt
Technical debt, this needs solving in the long-term
Improvement
Currently
We have only one
FileTree
implementation, which is tailored specifically to use in NexusMods.App's LoadoutSynchronizer and FOMOD installer.We want
When working on the Advanced Installer Functionality, a need to display a file tree of existing game folders arose.
Specifically, displaying existing files in Game directory and Saves directory.
This involves reading the directory structure of the game, and displaying it into UI.
Originally I considered:
Adding an method into
GameInstallation
for building a file tree.Adding an extension method to this library that emits a FileTree from
AbsolutePath
.Therefore while it's technically not blocking; it's very much blocking in the sense that long term, this will lead to more work.
Design
Here is an example of how you can write trees using traits:
To use it, simply create a tree type and implement the interface
And you can now call methods provided by these interfaces:
Note that this approach is zero overhead. i.e. It's as good as if written directly into class.
The text was updated successfully, but these errors were encountered: