(dirname, indexname=None)
return False
Returns True if dirname contains a Whoosh index.

    :param dirname: the file path of a directory.
    :param indexname: the name of the index. If None, the default index name is
        used.
Returns True if dirname contains a Whoosh index.
Returns True if dirname contains a Whoosh index .
def exists_in(dirname, indexname=None):
    """Returns True if dirname contains a Whoosh index.

    :param dirname: the file path of a directory.
    :param indexname: the name of the index. If None, the default index name is
        used.
    """

    if os.path.exists(dirname):
        try:
            ix = open_dir(dirname, indexname=indexname)
            return ix.latest_generation() > -1
        except EmptyIndexError:
            pass

    return False
def exists_in ( dirname , indexname = None ) : if os . path . exists ( dirname ) : try : ix = open_dir ( dirname , indexname = indexname ) return ix . latest_generation ( ) > - 1 except EmptyIndexError : pass return False