// Exists checks if given rulespec in specified table/chain exists
326444
func (ipt *IPTables) Exists(table, chain string, rulespec ...string) (bool, error) {
	if !ipt.hasCheck {
		return ipt.existsForOldIptables(table, chain, rulespec)

	}
	cmd := append([]string{"-t", table, "-C", chain}, rulespec...)
	err := ipt.run(cmd...)
	eerr, eok := err.(*Error)
	switch {
	case err == nil:
		return true, nil
	case eok && eerr.ExitStatus() == 1:
		return false, nil
	default:
		return false, err
	}
}
1270336
func (self *Model) Exists(id interface{}) bool {
	return self.db.Exists(self.collection.Name, id)
}
587415
func (s *Key) Exists() bool {
	_, err := os.Stat(s.Path())
	if os.IsNotExist(err) {
		return false
	}

	return true
}
996085
func (c *MemoryStore) Exists(key string) (bool, error) {
	if _, exists := c.cache.Get(key); exists {
		return true, nil
	}
	return false, nil
}
430109
func Exists(t TestReporter, path string) bool {
	exists, err := afero.Exists(appFs, path)
	if err != nil {
		t.Error("Something went wrong when checking if "+path+"exists!", err)
	}
	return exists
}
629440
func (s *StoreToJobLister) Exists(job *extensions.Job) (bool, error) {
	_, exists, err := s.Store.Get(job)
	if err != nil {
		return false, err
	}
	return exists, nil
}
1357290
func (client *GCSBlobstore) Exists(dest string) (exists bool, err error) {
	if exists, err = client.exists(client.publicGCS, dest); err == nil {
		return exists, nil
	}

	// If the public client fails, try using it as an authenticated actor
	if client.authenticatedGCS != nil {
		return client.exists(client.authenticatedGCS, dest)
	}

	return
}
610359
func (c *Collection) Exists(id string) (bool, error) {
	t := c.pool.NewTransaction()
	exists := false
	t.Exists(c, id, &exists)
	if err := t.Exec(); err != nil {
		return false, err
	}
	return exists, nil
}
305098
func Exists(m Mock) bool {
	storeMutex.RLock()
	defer storeMutex.RUnlock()
	for _, mock := range mocks {
		if mock == m {
			return true
		}
	}
	return false
}
1007013
func (e *Entity) Exists(name string) bool {
	return e.Get(name) != nil
}
392588
func (list *TargetList) Exists(id TargetID) bool {
	list.RLock()
	defer list.RUnlock()

	_, found := list.targets[id]
	return found
}
990887
func (c ConnAdapter) Exists(path string) (bool, *zk.Stat, error) {
	return c.ExistsF(path)
}
383390
func (s *S3Storage) Exists(filepath string) bool {
	_, err := s.Key(filepath)

	if err != nil {
		return false
	}

	return true
}
993339
func (s *DbSession) Exists(query Q, document Document) (bool, error) {
	q := s.findQuery(document, query)
	if err := q.Select(bson.M{"_id": 1}).Limit(1).One(document); err != nil {
		if err.Error() == mgo.ErrNotFound.Error() {
			return false, nil
		}
		return false, err
	}
	return true, nil
}
913560
func Exists(args ...string) bool {
	if _, err := Raw(append([]string{"-C"}, args...)...); err != nil {
		return false
	}
	return true
}
867967
func (p *PostgresProvider) Exist(sid string) bool {
	var data []byte
	err := p.c.QueryRow("SELECT data FROM session WHERE key=$1", sid).Scan(&data)
	if err != nil && err != sql.ErrNoRows {
		panic("session/postgres: error checking existence: " + err.Error())
	}
	return err != sql.ErrNoRows
}
1003058
func (d *Driver) Exists(id string) bool {
	d.Lock()
	defer d.Unlock()
	return d.filesystemsCache[d.zfsPath(id)]
}