def file_infos(names=None):
    """
    iterates over storage files metadata.
    note: we put the storage name into the metadata as 'id'

    :param names: None means "all items"
                  otherwise give a list of storage item names
    """
    storage = current_app.storage
    if names is None:
        names = list(storage)
    for name in names:
        try:
            with storage.open(name) as item:
                meta = dict(item.meta)
                if delete_if_lifetime_over(item, name):
                    continue
                meta['id'] = name
                yield meta
        except (__HOLE__, IOError) as e:
            if e.errno != errno.ENOENT:
                raise
dataset/ETHPy150Open bepasty/bepasty-server/bepasty/views/filelist.py/file_infos