// Exists checks if the named entity exists
542104
func (s *Store) Exists(ctx context.Context, name string) bool {
	path := filepath.Join(s.path, filepath.Clean(name))
	out.Debug(ctx, "fs.Exists(%s) - %s", name, path)
	return fsutil.IsFile(path)
}
997772
func (s *Session) Exists(ctx context.Context, key string) bool {
	sd := s.getSessionDataFromContext(ctx)

	sd.mu.Lock()
	_, exists := sd.Values[key]
	sd.mu.Unlock()

	return exists
}
960497
func (doc *Document) Exists() ([]byte, error) {
	// Use the get operation to get it.
	body, err := doc.Db.Req.Get(doc.Id, nil)

	if err != nil {
		return nil, err
	} else {
		result := &struct {
			Error string `json:"error"`
			Ok    bool   `json:"ok"`
			Id    string `json:"_id"`
			Rev   string `json:"_rev"`
		}{}
		err = json.Unmarshal(body, result)
		if err != nil {
			return nil, err
		}

		if result.Error != "" {
			return nil, errors.New(result.Error)
		}
		doc.Id = result.Id
		doc.Rev = result.Rev
	}
	return body, nil
}
383390
func (s *S3Storage) Exists(filepath string) bool {
	_, err := s.Key(filepath)

	if err != nil {
		return false
	}

	return true
}
88905
func (r *MiekgDNSResolver) Exists(name string) (bool, error) {
	req := new(dns.Msg)
	req.SetQuestion(name, dns.TypeA)

	res, err := r.exchange(req)
	if err != nil {
		return false, err
	}

	return len(res.Answer) > 0, nil
}
1310656
func (f *FilterOp) Exists(field string) *FilterOp {
	f.ExistsProp = &propertyPathMarker{Field: field}
	return f
}
1132514
func (s *StoreToDaemonSetLister) Exists(ds *extensions.DaemonSet) (bool, error) {
	_, exists, err := s.Store.Get(ds)
	if err != nil {
		return false, err
	}
	return exists, nil
}
852298
func (aSpace *addrSpace) Exists() bool {
	aSpace.Lock()
	defer aSpace.Unlock()
	return aSpace.dbExists
}
972914
func (d *Driver) Exists(id string) bool {
	path := path.Join(virtPath, id)

	_, err := os.Stat(path)

	if err == nil {
		return true
	} else {
		return false
	}
}
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
}
11454
func (m *podContainerManagerImpl) Exists(pod *v1.Pod) bool {
	podContainerName, _ := m.GetPodContainerName(pod)
	return m.cgroupManager.Exists(podContainerName)
}
913560
func Exists(args ...string) bool {
	if _, err := Raw(append([]string{"-C"}, args...)...); err != nil {
		return false
	}
	return true
}
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
}
1183478
func (m *Manager) Exists(username string, applicationid string) (bool, error) {
	count, err := m.getCollection().Find(bson.M{"username": username, "applicationid": applicationid}).Count()

	return count == 1, err
}
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
}
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
}
593163
func (l *httpFileSystemLoader) Exists(name string) (string, bool) {
	if l.fs == nil {
		return "", false
	}
	if f, err := l.Open(name); err == nil {
		f.Close()
		return name, true
	}
	return "", false
}