You could have the MD as a .mut
file as you suggest or drill down to show the keys as filenames or, as a directory structure using ‘/’ separators as we do now for _public
etc.
You could also decide based on the values. So if they appear to be immutable, treat like _public
. If we were to have suitable metadata for MD entries that choice can be made more reliably.
The SAFE FUSE design can handle different MD uses cases like that. It has a tree of mount handler classes, each of which will handle a known arrangement of MD (eg the root with any root file container, or the public names container MD/services MD/NFS container MD group etc). Correspondingly in SafenetworkJs there is a class for each kind of MD we know about.
So this makes it easy to cascade MD types and FS views in a file system tree, such as:
_publicNames/
happybeing/
messages@email/
mailbox/
inbox/
hi from Josh.eml
Re: meet up.eml
blog@www/
root-www/
index.html
posts.html
lib/
sort.js
Obviously this relies on understanding the MD format but would be extensible in the same way the SafenetworkJs library can allow for adding support for different SAFE RESTful services (and other things).
I’m not sure what the best way of handling an MD with unknown content would be, so think anything would do to start but also good to try and get decent metadata for both the MD itself and individual values, and be thoughtful about defaults where we don’t have metadata or don’t understand the type.
If you want to play with this at some point it would be easy to do in SAFE FUSE, which would be great. I’m working through the basic file system operations, about to start on the class which handles an NFS emulation MD so I can actually see files! This is a really fun bit, but going slowly with just me (so anyone reading is welcome to join in and help, see here ).
As of yesterday it shows the folder structure in _public
but as the handler framework is working it would be easy to add a handler for mounting a raw MD and then play with that to produce listings of any MD.