def exists(name, path=None):
    '''
    Returns whether the named container exists.

    path
        path to the container parent directory (default: /var/lib/lxc)

        .. versionadded:: 2015.8.0


    CLI Example:

    .. code-block:: bash

        salt '*' lxc.exists name
    '''

    _exists = name in ls_(path=path)
    # container may be just created but we did cached earlier the
    # lxc-ls results
    if not _exists:
        _exists = ls_(cache=False, path=path) in name
    return _exists
dataset/ETHPy150Open saltstack/salt/salt/modules/lxc.py/exists/swapped operands of `in`