// Move moves one or many secrets
552067
func (s *Store) Move(ctx context.Context, from string, to string) error {
	// recursive move?
	if s.IsDir(ctx, from) {
		if s.Exists(ctx, to) {
			return errors.Errorf("Can not move dir to file")
		}
		sf, err := s.List(ctx, "")
		if err != nil {
			return errors.Wrapf(err, "failed to list store")
		}
		destPrefix := to
		if s.IsDir(ctx, to) {
			destPrefix = filepath.Join(to, filepath.Base(from))
		}
		for _, e := range sf {
			if !strings.HasPrefix(e, strings.TrimSuffix(from, "/")+"/") {
				continue
			}
			et := filepath.Join(destPrefix, strings.TrimPrefix(e, from))
			if err := s.Move(ctx, e, et); err != nil {
				out.Error(ctx, "Failed to move '%s' to '%s': %s", e, et, err)
			}
		}
		return nil
	}

	content, err := s.Get(ctx, from)
	if err != nil {
		return errors.Wrapf(err, "failed to decrypt '%s'", from)
	}
	if err := s.Set(ctx, to, content); err != nil {
		return errors.Wrapf(err, "failed to write '%s'", to)
	}
	if err := s.Delete(ctx, from); err != nil {
		return errors.Wrapf(err, "failed to delete '%s'", from)
	}
	return nil
}
218271
func (s *secrets) Remove(secrets []string) {
	s.mu.Lock()
	defer s.mu.Unlock()
	for _, secret := range secrets {
		delete(s.m, secret)
	}
}
1290673
func (w *Worktree) Move(from, to string) (plumbing.Hash, error) {
	// TODO(mcuadros): support directories and/or implement support for glob
	if _, err := w.Filesystem.Lstat(from); err != nil {
		return plumbing.ZeroHash, err
	}

	if _, err := w.Filesystem.Lstat(to); err == nil {
		return plumbing.ZeroHash, ErrDestinationExists
	}

	idx, err := w.r.Storer.Index()
	if err != nil {
		return plumbing.ZeroHash, err
	}

	hash, err := w.deleteFromIndex(idx, from)
	if err != nil {
		return plumbing.ZeroHash, err
	}

	if err := w.Filesystem.Rename(from, to); err != nil {
		return hash, err
	}

	if err := w.addOrUpdateFileToIndex(idx, to, hash); err != nil {
		return hash, err
	}

	return hash, w.r.Storer.SetIndex(idx)
}
345620
func (all *assetLruList) MoveToBack(alle *assetLruListElement) {
	if alle.list != all || all.root.prev == alle {
		return
	}
	// see comment in assetLruList.Remove about initialization of l
	all.insert(all.remove(alle), all.root.prev)
}
584192
func (c *Client) MoveAsync(fromAccount, toAccount string, amount btcutil.Amount) FutureMoveResult {
	cmd := btcjson.NewMoveCmd(fromAccount, toAccount, amount.ToBTC(), nil,
		nil)
	return c.sendCmd(cmd)
}
477771
func MoveTo(str string, x int, y int) (out string) {
	x, y = GetXY(x, y)

	return applyTransform(str, func(idx int, line string) string {
		return fmt.Sprintf("\033[%d;%dH%s", y+idx, x, line)
	})
}
240076
func Move(ctx context.Context, src, dst string) (err error) {
	// Check context
	if err = ctx.Err(); err != nil {
		return
	}

	// Copy
	if err = Copy(ctx, src, dst); err != nil {
		return
	}

	// Check context
	if err = ctx.Err(); err != nil {
		return
	}

	// Delete
	err = os.Remove(src)
	return
}
172173
func (l *list) MoveToBack(e *element) {
	if e.list != l || l.root.prev == e {
		return
	}
	// see comment in List.Remove about initialization of l
	l.insert(l.remove(e), l.root.prev)
}
370988
func moveRedRight(h *Node) *Node {
	flip(h)
	if isRed(h.Left.Left) {
		h = rotateRight(h)
		flip(h)
	}
	return h
}
388067
func (c *Client) Move(fromAccount, toAccount string, amount btcutil.Amount) (bool, error) {
	return c.MoveAsync(fromAccount, toAccount, amount).Receive()
}
262472
func (secrets *Secrets) Update(key string, rls *rspb.Release) error {
	// set labels for secrets object meta data
	var lbs labels

	lbs.init()
	lbs.set("MODIFIED_AT", strconv.Itoa(int(time.Now().Unix())))

	// create a new secret object to hold the release
	obj, err := newSecretsObject(key, rls, lbs)
	if err != nil {
		secrets.Log("update: failed to encode release %q: %s", rls.Name, err)
		return err
	}
	// push the secret object out into the kubiverse
	_, err = secrets.impl.Update(obj)
	if err != nil {
		secrets.Log("update: failed to update: %s", err)
		return err
	}
	return nil
}
465777
func (d *driver) Move(ctx context.Context, sourcePath string, destPath string) error {
	logrus.Infof("Move from %s to %s", d.ossPath(sourcePath), d.ossPath(destPath))
	err := d.Bucket.CopyLargeFileInParallel(d.ossPath(sourcePath), d.ossPath(destPath),
		d.getContentType(),
		getPermissions(),
		d.getOptions(),
		maxConcurrency)
	if err != nil {
		logrus.Errorf("Failed for move from %s to %s: %v", d.ossPath(sourcePath), d.ossPath(destPath), err)
		return parseError(sourcePath, err)
	}

	return d.Delete(ctx, sourcePath)
}
324632
func (d *driver) Move(ctx context.Context, sourcePath string, destPath string) error {
	_, headers, err := d.Conn.Object(d.Container, d.swiftPath(sourcePath))
	if err == nil {
		if manifest, ok := headers["X-Object-Manifest"]; ok {
			if err = d.createManifest(destPath, manifest); err != nil {
				return err
			}
			err = d.Conn.ObjectDelete(d.Container, d.swiftPath(sourcePath))
		} else {
			err = d.Conn.ObjectMove(d.Container, d.swiftPath(sourcePath), d.Container, d.swiftPath(destPath))
		}
	}
	if err == swift.ObjectNotFound {
		return storagedriver.PathNotFoundError{Path: sourcePath}
	}
	return err
}
859126
func (g *Game) MoveStr(s string) error {
	m, err := g.notation.Decode(g.pos, s)
	if err != nil {
		return err
	}
	return g.Move(m)
}
933151
func MoveTo(db *gorm.DB, value sortingInterface, pos int) error {
	return move(db, value, pos-value.GetPosition())
}
987490
func (d *domainClient) MoveTo(ctx context.Context, args *MoveToArgs) (reply *MoveToReply, err error) {
	reply = new(MoveToReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "DOM.moveTo", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "DOM.moveTo", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "DOM", Op: "MoveTo", Err: err}
	}
	return
}
22159
func (c *Cursor) Move(x int, y int) {
	fmt.Fprintf(c.Out, "\x1b[%d;%df", x, y)
}