copy

package
v20.10.26+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirCopy

func DirCopy(srcDir, dstDir string, copyMode Mode, copyOpaqueXattrs bool) error

DirCopy copies or hardlinks the contents of one directory to another, properly handling soft links, "security.capability" and (optionally) "trusted.overlay.opaque" xattrs.

The copyOpaqueXattrs controls if "trusted.overlay.opaque" xattrs are copied. Passing false disables copying "trusted.overlay.opaque" xattrs.

Types

type Mode

type Mode int

Mode indicates whether to use hardlink or copy content

const (
	// Content creates a new file, and copies the content of the file
	Content Mode = iota
	// Hardlink creates a new hardlink to the existing file
	Hardlink
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL