Ugarit
View Ticket
Login
Ticket UUID: b6e76381188077bf23e5d48aff8e0307ff56c663
Title: Refactor the VFS
Status: Open Type: Refactoring
Severity: Cosmetic Priority: 1_High
Subsystem: Core Resolution: Open
Last Modified: 2015-06-16 17:49:45
Version Found In:
Description:
The VFS layer is a bit messy. Different node types are hardcoded all over the place, and traverse-vault-node always does a fold-vault-node, even when it's blatantly inefficient to do so, as we can find things direct from the path component. For instance, top-level tags. Also, it would be nice to allow references to objects that we can't enumerate, such as object hashes or "hash plus arbitrary extension" (making parts of the pathname irrelevant).

Therefore, it would be good to create a registry of node types, each of which has a nice record full of closures for fold and traverse; if the traversal routine is #f, then a default implementation (that folds until it finds the sub-node) is used.