'Return the names of the top-level folders.'

def listfolders(self):

    folders = []
    path = self.getpath()
    for name in os.listdir(path):
        fullname = os.path.join(path, name)
        if os.path.isdir(fullname):
            folders.append(name)
    folders.sort()
    return folders
