from typing import OrderedDict


def _file_list_table_format(result):
    """Format file list as a table."""
    table_output = []
    for item in result:
        table_row = OrderedDict()
        table_row['Name'] = item['name']
        table_row['URL'] = item['url']
        table_row['Is Directory'] = str(item['isDirectory'])
        table_row['Content Length'] = str(item['properties']['contentLength']) \
            if item['properties'] else ""
        table_row['Creation Time'] = item['properties']['creationTime'] \
            if item['properties'] else ""
        table_output.append(table_row)
    return table_output