def path_str(folder):
    """
    If 'path_collection' is present, returns the folder's full path.
    Otherwise, return the folder name.
    """
    path = ""
    if hasattr(folder, 'path_collection'):
        path = "/" + "/".join(map(lambda p: p['name'], folder.path_collection['entries'])) + "/"
    return path + folder.name