// Exists checks if blob exists in an S3 compatible blobstore
339828
func (client *S3Blobstore) Exists(dest string) (bool, error) {

	existsParams := &s3.HeadObjectInput{
		Bucket: aws.String(client.s3cliConfig.BucketName),
		Key:    client.key(dest),
	}

	_, err := client.s3Client.HeadObject(existsParams)

	if err == nil {
		log.Printf("File '%s' exists in bucket '%s'\n", dest, client.s3cliConfig.BucketName)
		return true, nil
	}

	if reqErr, ok := err.(awserr.RequestFailure); ok {
		if reqErr.StatusCode() == 404 {
			log.Printf("File '%s' does not exist in bucket '%s'\n", dest, client.s3cliConfig.BucketName)
			return false, nil
		}
	}
	return false, err
}
168653
func (s Int64Slice) Exists(x int64) bool {
	i := s.Search(x)
	if i == len(s) {
		return false
	}

	return s[i] == x
}
1270336
func (self *Model) Exists(id interface{}) bool {
	return self.db.Exists(self.collection.Name, id)
}
320979
func (b *BiMap) Exists(k interface{}) bool {
	b.s.RLock()
	defer b.s.RUnlock()
	_, ok := b.forward[k]
	return ok
}
587415
func (s *Key) Exists() bool {
	_, err := os.Stat(s.Path())
	if os.IsNotExist(err) {
		return false
	}

	return true
}
1074545
func (g *Container) Exists(hierarchy ...string) bool {
	return g.Search(hierarchy...) != nil
}
256676
func (r *Store) Exists(ctx context.Context, name string) bool {
	_, store, name := r.getStore(ctx, name)
	return store.Exists(ctx, name)
}
303108
func (s *Store) Exists(ctx context.Context, name string) bool {
	return s.storage.Exists(ctx, s.passfile(name))
}
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
}
1196248
func (s Store) Exists(key string) bool {
	_, err := s.Get(key)
	if err != nil {
		return false
	}
	return true
}
114404
func (c *Client) Exists(key string) (bool, error) {
	v, err := c.execWithKey(true, "EXISTS", key)
	if err != nil {
		return false, err
	}
	return iface2bool(v)
}
981731
func Exists(table Table, chain string, rule ...string) bool {
	return exists(false, table, chain, rule...)
}
1003058
func (d *Driver) Exists(id string) bool {
	d.Lock()
	defer d.Unlock()
	return d.filesystemsCache[d.zfsPath(id)]
}
387495
func (m *mruNonceMap) Exists(nonce uint64) bool {
	m.mtx.Lock()
	_, exists := m.nonceMap[nonce]
	m.mtx.Unlock()

	return exists
}
491058
func Exists(path string) (bool, error) {
	path, err := filepath.Abs(filepath.Join(path, keysBoltFile))
	if err != nil {
		return false, trace.Wrap(err)
	}
	f, err := os.Open(path)
	err = trace.ConvertSystemError(err)
	if err != nil {
		if trace.IsNotFound(err) {
			return false, nil
		}
		return false, trace.Wrap(err)
	}
	defer f.Close()
	return true, nil
}
573064
func (s *MockStore) Exists(key string) (bool, error) {
	_, ok := s.db[key]
	return ok, nil
}
1010378
func (s *SvcManager) Exists(name string, conf common.Conf) (bool, error) {
	return false, nil
}