def files_under(path, extensions = None):

    assert not isinstance(extensions, str)

    if os.path.isfile(path):
        walked = [path]
    else:
        def walk_path():
            for (p, _, f) in os.walk(path, followlinks = True):
                for n in f:
                    yield os.path.join(p, n)

        walked = walk_path()

    if extensions is None:
        for name in walked:
            yield name
    else:
        for name in walked:
            if any(name.endswith(e) for e in extensions):
                yield name
@param name: Plugins name
dataset/ETHPy150Open borg-project/borg/borg/util.py/files_under--crossover with--dataset/ETHPy150Open pyjs/pyjs/pyjswaddons/FlowPlayer.py/Player.getPlugin