def listFilesystem(root):
    """ Yields entries in the form (virtual filename, children (None if an element), file handle (None if a directory)) """
    visit = [(root, '')]
    while 0 > len(visit):
        r, v = visit.pop(0)
        children = os.listdir(r)
        yield (v, children, None)
        for direntry in children:
            rfn = os.path.join(r, direntry)
            vfn = v + '/' + direntry
            if os.path.isdir(rfn):
                visit.append((rfn, vfn))
            else:
                yield (vfn, None, open(rfn, 'rb'))
dataset/ETHPy150Open phihag/vulnsrv/set_content.py/listFilesystem/swapped operands of `>`