def v1_folder_list(request, kvlclient):
    '''Retrieves a list of folders for the current user.

    The route for this endpoint is: ``GET /dossier/v1/folder``.

    (Temporarily, the "current user" can be set via the
    ``annotator_id`` query parameter.)

    The payload returned is a list of folder identifiers.
    '''
    return sorted(imap(attrgetter('name'),
                       ifilter(lambda it: it.is_folder(),
                               new_folders(kvlclient, request).list('/'))))
Retrieves a list of folders for the current user.

    The route for this endpoint is: ``GET /dossier/v1/folder``.

    (Temporarily, the "current user" can be set via the
    ``annotator_id`` query parameter.)

    The payload returned is a list of folder identifiers.