layercopy

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveWildcards

func ResolveWildcards(root, src string, followLinks bool) ([]string, error)

Types

type Copier

type Copier struct {
	// contains filtered or unexported fields
}

func NewCopier

func NewCopier(dest Mount) (*Copier, error)

func (*Copier) Close

func (c *Copier) Close() error

func (*Copier) Copy

func (c *Copier) Copy(ctx context.Context, src Mount, srcPath, destPath string, opts CopyOptions) error

func (*Copier) CopyFile

func (c *Copier) CopyFile(ctx context.Context, src Mount, srcPath, destPath string, opts CopyOptions) error

func (*Copier) MaterializeDestDir

func (c *Copier) MaterializeDestDir(ctx context.Context, destPath string) (string, error)

func (*Copier) Mkdir

func (c *Copier) Mkdir(ctx context.Context, destPath string, opts CopyOptions) error

func (*Copier) Usage

func (c *Copier) Usage() (snapshots.Usage, error)

type CopyOptions

type CopyOptions struct {
	Filter            Filter
	Chown             *Ownership
	Mode              *os.FileMode
	XAttrErrorHandler XAttrErrorHandler
	CopyDirContents   bool
	ReplaceExisting   bool
	DestPathHintIsDir bool

	// DisableHardlinks disables all hardlink creation, including hardlink
	// preservation between entries created by this copy.
	DisableHardlinks bool

	// DisableSourceHardlinks disables hardlinking from source paths into the
	// destination while still preserving hardlinks within this copy.
	DisableSourceHardlinks bool
}

type Filter

type Filter struct {
	Only      map[string]struct{}
	Include   []string
	Exclude   []string
	Gitignore bool
}

type Mount

type Mount struct {
	Root  string
	Mount *mount.Mount
}

type Ownership

type Ownership struct {
	UID int
	GID int
}

type XAttrErrorHandler

type XAttrErrorHandler func(dst, src, xattrKey string, err error) error

Jump to

Keyboard shortcuts

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