// PresumeExists causes the Checker to report that item exists on the server.
970644
func (c *BundlingChecker) PresumeExists(item *Item) {
	c.mu.Lock()
	defer c.mu.Unlock()
	c.existingDigests[string(item.Digest)] = struct{}{}
}
883686
func (S3PathChecker) FileExists(path string) bool {
	reader, err := pathio.Reader(path)
	if reader != nil {
		defer reader.Close()
	}
	return err == nil
}
1220851
func (d Data) KeyExists(key string) bool {
	_, found := d.Values[key]
	return found
}
792681
func ExpectAlreadyExists(c *check.C, err error) {
	c.Assert(trace.IsAlreadyExists(err), check.Equals, true, check.Commentf("expected AlreadyExists, got %T %v at %v", trace.Unwrap(err), err, string(debug.Stack())))
}
645487
func CheckExists(ctx context.Context, db *gorm.DB, tableName string, id string) error {
	_, err := exists(ctx, db, tableName, "id", id, true)
	return err
}
61229
func (m *nfsMounter) serverExists(server string) bool {
	for _, v := range m.servers {
		if v == server || v == NFSAllServers {
			return true
		}
	}
	return false
}
625643
func (l *Loader) WalletExists() (bool, error) {
	dbPath := filepath.Join(l.dbDirPath, walletDbName)
	return fileExists(dbPath)
}
69404
func pathExists(p string) bool {
	if _, err := os.Lstat(p); err != nil && os.IsNotExist(err) {
		return false
	}
	return true
}
1298116
func (a arping) blockUntilInterfaceExists(interfaceName string) {
	// TODO: Timeout waiting for net interface to exist?
	for !a.fs.FileExists(path.Join("/sys/class/net", interfaceName)) {
		time.Sleep(a.interfaceCheckDelay)
	}
}
891796
func CheckExists(ctx context.Context, db *gorm.DB, tableName string, id uuid.UUID) error {
	_, err := Exists(ctx, db, tableName, id.String())
	return err
}
212958
func (g *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error) {
	_, err := g.instanceByProviderID(providerID)
	if err != nil {
		if err == cloudprovider.InstanceNotFound {
			return false, nil
		}
		return false, err
	}

	return true, nil
}
1000395
func AlreadyExists(message string, args ...interface{}) error {
	return WrapWithMessage(&AlreadyExistsError{
		fmt.Sprintf(message, args...),
	}, message, args...)
}
1029295
func CheckPackageExists(c context.Context, pkg string) error {
	switch res, err := CheckPackages(c, []string{pkg}, true); {
	case err != nil:
		return errors.Annotate(err, "failed to check the package presence").Err()
	case len(res) == 0:
		return errors.Reason("no such package").Tag(grpcutil.NotFoundTag).Err()
	default:
		return nil
	}
}
900666
func (c *Connector) ScopeExists(ctx context.Context, scope string) (bool, error) {
	panic("not implemented")
}
45282
func (fsh *Handler) FileExists(file string) bool {
	if _, err := os.Stat(file); os.IsNotExist(err) {
		return false
	}
	return true
}
38905
func dbUserExists(ctx sessionctx.Context, name string, host string, db string) (bool, error) {
	sql := fmt.Sprintf(`SELECT * FROM %s.%s WHERE User='%s' AND Host='%s' AND DB='%s';`, mysql.SystemDB, mysql.DBTable, name, host, db)
	return recordExists(ctx, sql)
}
342969
func (m *GormIdentityRepository) CheckExists(ctx context.Context, id string) error {
	defer goa.MeasureSince([]string{"goa", "db", "identity", "exists"}, time.Now())
	return base.CheckExists(ctx, m.db, m.TableName(), id)
}