// Has returns whether a block at that specific index, and that specific version of the file
// is currently available on the remote device for pulling from a temporary file.
184124
func (p *deviceFolderDownloadState) Has(file string, version protocol.Vector, index int32) bool {
	p.mut.RLock()
	defer p.mut.RUnlock()

	local, ok := p.files[file]

	if !ok || !local.version.Equal(version) {
		return false
	}

	for _, existingIndex := range local.blockIndexes {
		if existingIndex == index {
			return true
		}
	}
	return false
}
707418
func (ks *FSKeystore) Has(name string) (bool, error) {
	kp := filepath.Join(ks.dir, name)

	_, err := os.Stat(kp)

	if os.IsNotExist(err) {
		return false, nil
	}

	if err != nil {
		return false, err
	}

	if err := validateName(name); err != nil {
		return false, err
	}

	return true, nil
}
589378
func (smap *syncedMap) Has(key interface{}) bool {
	_, ok := smap.Get(key)
	return ok
}
827742
func (s *Selection) Has(selector string) *Selection {
	return s.HasSelection(s.document.Find(selector))
}
1319680
func (s *podSet) Has(pod *v1.Pod) bool {
	return s.HasId(podId(pod))
}
858394
func (s String) Has(item string) bool {
	_, contained := s[item]
	return contained
}
1337091
func (c *Context) Has(key string) bool {
	return c.Get(key) != nil
}
1061774
func (dds *Delayed) Has(key ds.Key) (exists bool, err error) {
	dds.delay.Wait()
	return dds.ds.Has(key)
}
1280626
func (c *ARC) Has(key interface{}) bool {
	c.mu.RLock()
	defer c.mu.RUnlock()
	now := time.Now()
	return c.has(key, &now)
}
865427
func (r *RepoFile) Has(name string) bool {
	for _, rf := range r.Repositories {
		if rf.Name == name {
			return true
		}
	}
	return false
}
915944
func (s Int32) Has(item int32) bool {
	_, contained := s[item]
	return contained
}
149667
func (snap *dbCacheSnapshot) Has(key []byte) bool {
	// Check the cached entries first.
	if snap.pendingRemove.Has(key) {
		return false
	}
	if snap.pendingKeys.Has(key) {
		return true
	}

	// Consult the database.
	hasKey, _ := snap.dbSnapshot.Has(key, nil)
	return hasKey
}
194092
func (bi *blockIndex) HaveBlock(hash *chainhash.Hash) bool {
	bi.RLock()
	_, hasBlock := bi.index[*hash]
	bi.RUnlock()
	return hasBlock
}
1369496
func (b *Box) Has(name string) bool {
	_, err := b.Find(name)
	return err == nil
}
838886
func (tx *transaction) hasBlock(hash *chainhash.Hash) bool {
	// Return true if the block is pending to be written on commit since
	// it exists from the viewpoint of this transaction.
	if _, exists := tx.pendingBlocks[*hash]; exists {
		return true
	}

	return tx.hasKey(bucketizedKey(blockIdxBucketID, hash[:]))
}
1017844
func (b *MemoryBookmarks) Has(name string) bool {
	_, ok := b.bookmarks[name]
	return ok
}
231366
func (m *SyncMap) Has(key string) bool {
	_, ok := m.Get(key)
	return ok
}