Q:

Is this the most "general" way of implementing a tree structure using RealmSwift? 

newbie to realm, I was wondering about how to build a tree structure using RealmSwift...
I tend to think about this as a mimic of a filesystem's folder idea, so,
class Folder: Object {
    dynamic var record = false
    dynamic var uuid = ""
    dynamic var title = ""
    let members = List<Folder>()
}

class Root: Object {
    dynamic var uuid = ""
    dynamic var title = "/"
    let members = List<Folder>()
}

I'd only have one Root, and then would implement various tree-walking, folder-manipulation, and so on.  If Folder.record is false, the folder node is a "directory", if it's true, the folder node is a "file"
oh wizards of RealmSwift, am I on the right track to build a tree structure using RealmSwift?? 

A:

If you want model a filesystem with files and folders, it will probably be simpler to do it like this:
class File: Object {
    dynamic var uuid  = ""
    dynamic var title = ""
}

class Folder: Object {
    dynamic var uuid  = ""
    dynamic var title = ""
    let files   = List<File>()
    let folders = List<Folder>()
}

Instead of an explicit root class, you could use the first first Folder object (accessible as realm.objects(Folder).first()).