The basic idea is maintain a GHashTable of accounts->trees in imuse.c and allow for the getattr(2), read(2), open(2), readdir(2) calls to navigate the trees appropriately.
Take the following crappy diagram:
Accounts/
|--> (d) github.com
|--> (f) NewEmail.template
|--> (d) INBOX
| |--> (d) INBOX.other
|--> (d) Junk
|--> (d) Sent
|--> (f) Some_Email_Subject-(2009-01-16).email
Look at muse_tree.c for more details on how I /think/ this should work
Signed-off-by: R. Tyler Ballance <tyler@monkeypox.org>
Now it's at least representing special directories properly, looking at N-ary tree in GLib for properly representing these based on configuration files, etc.
Signed-off-by: R. Tyler Ballance <tyler@slide.com>