// Exists returns true if the given id is registered with this driver.
420138
func (d *Driver) Exists(id string) bool {
	rID, err := d.resolveID(id)
	if err != nil {
		return false
	}
	result, err := hcsshim.LayerExists(d.info, rID)
	if err != nil {
		return false
	}
	return result
}
164714
func (r *RepositoryService) Exists(model interface{}, id int) bool {
	db, err := r.Connections.Make()

	if err != nil {
		return false
	}

	itemCount := 0
	db.Model(model).Where("id = ?", id).Count(&itemCount)

	return itemCount > 0
}
967458
func Exists(ctx context.Context, clt client.ImageAPIClient, image string) (bool, error) {
	_, err := InspectImage(ctx, clt, image)
	if err != nil {
		if client.IsErrNotFound(err) {
			return false, nil
		}
		return false, err
	}
	return true, nil
}
160554
func (s *Service) Exists() (bool, error) {
	// In any error case, we just say it doesn't exist with this configuration.
	// Subsequent calls into the Service will give the caller more useful errors.
	_, same, _, err := s.existsAndSame()
	if err != nil {
		return false, errors.Trace(err)
	}
	return same, nil
}
729827
func (ns *Namespace) Exists(name string) bool {
	_, found := ns.deps.Tmpl.Lookup(name)
	return found

}
1003058
func (d *Driver) Exists(id string) bool {
	d.Lock()
	defer d.Unlock()
	return d.filesystemsCache[d.zfsPath(id)]
}
852298
func (aSpace *addrSpace) Exists() bool {
	aSpace.Lock()
	defer aSpace.Unlock()
	return aSpace.dbExists
}
1327828
func (db *Database) Exists() error {
	resp := &struct {
		Error  string `json:"error"`
		DBName string `json:"db_name"`
	}{}
	body, err := db.Req.Get("", nil)
	if err != nil {
		return err
	}
	err = json.Unmarshal(body, resp)
	if err != nil {
		return err
	}
	if resp.Error != "" {
		return errors.New(resp.Error)
	}

	return nil
}
1285386
func (d *Driver) Exists(id string) bool {
	return d.DeviceSet.HasDevice(id)
}
362199
func (z *zookeeperKV) exists(key string) (bool, error) {
	key = z.domain + normalize(key)
	exists, _, err := z.client.Exists(key)
	if err != nil {
		return false, err
	}
	return exists, nil
}
1203669
func (db *DB) Exists(key []byte) (int64, error) {
	if err := checkKeySize(key); err != nil {
		return 0, err
	}

	var err error
	key = db.encodeKVKey(key)

	var v []byte
	v, err = db.bucket.Get(key)
	if v != nil && err == nil {
		return 1, nil
	}

	return 0, err
}
1231156
func Exists(execer exec.Interface) bool {
	_, err := execer.LookPath("conntrack")
	return err == nil
}
1007013
func (e *Entity) Exists(name string) bool {
	return e.Get(name) != nil
}
463636
func (m *Manager) Exists(contractID string) (bool, error) {
	count, err := m.collection.Find(bson.M{"contractid": contractID}).Count()
	return count >= 1, err
}
617531
func (d *NFSDriver) Exists(volumeName string) bool {
	var (
		fi  os.FileInfo
		err error
	)
	if fi, err = os.Stat(filepath.Join(d.root, volumeName)); err != nil {
		return false
	}
	return fi.IsDir()
}
303108
func (s *Store) Exists(ctx context.Context, name string) bool {
	return s.storage.Exists(ctx, s.passfile(name))
}
754998
func (s *StoreToPodLister) Exists(pod *api.Pod) (bool, error) {
	_, exists, err := s.Store.Get(pod)
	if err != nil {
		return false, err
	}
	return exists, nil
}