'Generator yielding all items under a VFS node.'

def _all_items(self, node):

    if isinstance(node, int):
        (yield self.lib.get_item(node))
    else:
        for (name, itemid) in sorted(node.files.items()):
            for v in self._all_items(itemid):
                (yield v)
        for (name, subdir) in sorted(node.dirs.items()):
            for v in self._all_items(subdir):
                (yield v)
