func (a *ACBuild) CopyToDir(froms []string, to string) (err error) {
	if err = a.lock(); err != nil {
		return err
	}
	defer func() {
		if err1 := a.unlock(); err == nil {
			err = err1
		}
	}()
	switch a.Mode {
	case BuildModeAppC:
		return a.copyToDirAppC(froms, to)
	case BuildModeOCI:
		return a.copyToDirOCI(froms, to)
	}
	return fmt.Errorf("unknown build mode: %s", a.Mode)
}
CopyToDir will copy all elements specified in the froms slice into the
directory inside the current ACI specified by the to string.
package lib
import (
	"fmt"
	"os"
	"path"
	"github.com/appc/spec/aci"
	"github.com/coreos/rkt/pkg/fileutil"
	"github.com/coreos/rkt/pkg/user"
	"github.com/containers/build/lib/oci"
	"github.com/containers/build/util"
)