kubernetes/staging/src/k8s.io/kubectl/pkg/cmd/cp/cp.go

var cpExample

type CopyOptions

// NewCopyOptions creates the options for copy
func NewCopyOptions(ioStreams genericiooptions.IOStreams) *CopyOptions {}

// NewCmdCp creates a new Copy command.
func NewCmdCp(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command {}

var errFileSpecDoesntMatchFormat

func extractFileSpec(arg string) (fileSpec, error) {}

// Complete completes all the required options
func (o *CopyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {}

// Validate makes sure provided values for CopyOptions are valid
func (o *CopyOptions) Validate() error {}

// Run performs the execution
func (o *CopyOptions) Run() error {}

// checkDestinationIsDir receives a destination fileSpec and
// determines if the provided destination path exists on the
// pod. If the destination path does not exist or is _not_ a
// directory, an error is returned with the exit code received.
func (o *CopyOptions) checkDestinationIsDir(dest fileSpec) error {}

func (o *CopyOptions) copyToPod(src, dest fileSpec, options *exec.ExecOptions) error {}

func (o *CopyOptions) copyFromPod(src, dest fileSpec) error {}

type TarPipe

func newTarPipe(src fileSpec, o *CopyOptions) *TarPipe {}

func (t *TarPipe) initReadFrom(n uint64) {}

func (t *TarPipe) Read(p []byte) (n int, err error) {}

func makeTar(src localPath, dest remotePath, writer io.Writer) error {}

func recursiveTar(srcDir, srcFile localPath, destDir, destFile remotePath, tw *tar.Writer) error {}

func (o *CopyOptions) untarAll(ns, pod string, prefix string, src remotePath, dest localPath, reader io.Reader) error {}

func (o *CopyOptions) execute(options *exec.ExecOptions) error {}