github.com/tsuna/docker@v1.7.0-rc3/daemon/copy.go (about)

     1  package daemon
     2  
     3  import "io"
     4  
     5  func (daemon *Daemon) ContainerCopy(name string, res string) (io.ReadCloser, error) {
     6  	container, err := daemon.Get(name)
     7  	if err != nil {
     8  		return nil, err
     9  	}
    10  
    11  	if res[0] == '/' {
    12  		res = res[1:]
    13  	}
    14  
    15  	return container.Copy(res)
    16  }