// Move will move one entry from one location to another.
// Moving an entry will decode it from the old location, encode it
// for the destination store with the right set of recipients and remove it
// from the old location afterwards.
502350
func (s *Store) Move(ctx context.Context, from, to string) error {
	// recursive move?
	if s.IsDir(ctx, from) {
		return errors.Errorf("recursive operations are not supported")
	}

	content, err := s.Get(ctx, from)
	if err != nil {
		return errors.Wrapf(err, "failed to decrypt '%s'", from)
	}
	if err := s.Set(WithReason(ctx, fmt.Sprintf("Moved from %s to %s", from, to)), 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
}
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)
}
1007068
func (t Transformer) MoveTo(x, y float64) {
	u := x*t.Tr[0] + y*t.Tr[2] + t.Tr[4]
	v := x*t.Tr[1] + y*t.Tr[3] + t.Tr[5]
	t.Flattener.MoveTo(u, v)
}
295848
func MoveNewFilesTo(oldDir, newDir string) error {
	oldFiles, err := ioutil.ReadDir(oldDir)
	if err != nil {
		return err
	}
	newFiles, err := ioutil.ReadDir(newDir)
	if err != nil {
		return err
	}

	for _, oldFile := range oldFiles {
		exists := false
		for _, newFile := range newFiles {
			if oldFile.Name() == newFile.Name() {
				exists = true
				break
			}
		}
		if !exists {
			os.Rename(filepath.Join(oldDir, oldFile.Name()), filepath.Join(newDir, oldFile.Name()))
		}
	}
	return nil
}
590338
func (dc DemuxFlattener) MoveTo(x, y float64) {
	for _, flattener := range dc.Flatteners {
		flattener.MoveTo(x, y)
	}
}
689437
func (all *assetLruList) MoveToFront(alle *assetLruListElement) {
	if alle.list != all || all.root.next == alle {
		return
	}
	// see comment in assetLruList.Remove about initialization of l
	all.insert(all.remove(alle), &all.root)
}
449615
func (r *RuneBuffer) MoveToLineEnd() {
	for i := r.idx; i < len(r.buf)-1; i++ {
		if r.buf[i] == '\n' {
			r.idx = i
			return
		}
	}
	r.idx = len(r.buf)
}
437632
func (s *StepperDriver) Move(stepsToMove int) error {
	if stepsToMove == 0 {
		return s.Halt()
	}

	if s.moving == true {
		//stop previous motion
		s.Halt()
	}

	s.mutex.Lock()
	s.moving = true
	s.direction = "forward"

	if stepsToMove < 0 {
		s.direction = "backward"
	}
	s.mutex.Unlock()

	stepsLeft := int64(math.Abs(float64(stepsToMove)))
	//Do not remove *1000 and change duration to time.Millisecond. It has been done for a reason
	delay := time.Duration(60000*1000/(s.stepsPerRev*s.speed)) * time.Microsecond

	for stepsLeft > 0 {
		if err := s.step(); err != nil {
			return err
		}
		stepsLeft--
		time.Sleep(delay)
	}

	s.moving = false
	return nil
}
1083790
func (l *PacketList) MoveAfter(e, mark *PacketElement) {
	if e.list != l || e == mark || mark.list != l {
		return
	}
	l.insert(l.remove(e), mark)
}
298170
func (j *mdIDJournal) move(newDir string) (oldDir string, err error) {
	return j.j.move(newDir)
}
207143
func (d *driver) Move(ctx context.Context, sourcePath string, destPath string) error {
	source := d.fullPath(sourcePath)
	dest := d.fullPath(destPath)

	if _, err := os.Stat(source); os.IsNotExist(err) {
		return storagedriver.PathNotFoundError{Path: sourcePath}
	}

	if err := os.MkdirAll(path.Dir(dest), 0755); err != nil {
		return err
	}

	err := os.Rename(source, dest)
	return err
}
520170
func (c *Client) Move(src, dst string) error {
	_, err := c.Files.Move(&dropbox.MoveInput{
		FromPath: src,
		ToPath:   dst,
	})
	return err
}
290765
func (m *DatastoreFileManager) MoveFile(ctx context.Context, src string, dst string) error {
	srcp := m.Path(src)
	dstp := m.Path(dst)

	task, err := m.FileManager.MoveDatastoreFile(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force)
	if err != nil {
		return err
	}

	return m.wait(ctx, task)
}
734060
func (c *Card) MoveToTopOfList() error {
	path := fmt.Sprintf("cards/%s", c.ID)
	return c.client.Put(path, Arguments{"pos": "top"}, c)
}
672233
func (g *Game) Move(m *Move) error {
	valid := moveSlice(g.ValidMoves()).find(m)
	if valid == nil {
		return fmt.Errorf("chess: invalid move %s", m)
	}
	g.moves = append(g.moves, valid)
	g.pos = g.pos.Update(valid)
	g.positions = append(g.positions, g.pos)
	g.updatePosition()
	return nil
}
462554
func (r Rect) Moved(delta Vec) Rect {
	return Rect{
		Min: r.Min.Add(delta),
		Max: r.Max.Add(delta),
	}
}
896027
func moveToFront(item string, xs []string) {
	for i, x := range xs {
		if x != item {
			continue
		}
		if i == 0 {
			return
		}
		copy(xs[1:], xs[0:i])
		xs[0] = item
		return
	}
}