tree

package
v0.3.19 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetadataProvider

type MetadataProvider interface {
	ApplyToHeader(hdr *tar.Header, pathInImage string) error
}

MetadataProvider is an interface for applying metadata to tar headers

type Recorder

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

func NewRecorder

func NewRecorder(tf api.TarCAS) Recorder

func (Recorder) EmptyFile added in v0.3.10

func (r Recorder) EmptyFile(target string) error

func (Recorder) Executable

func (r Recorder) Executable(binaryPath, target string, accessor runfilesSupplier) error

func (Recorder) Header added in v0.3.19

func (r Recorder) Header(hdr *tar.Header) error

Header records a non-regular entry (directory, symlink, device, ...) from a caller-supplied tar header.

Unlike the other Recorder methods, the header is used as given: no metadata provider is consulted and no fields are defaulted. This is for callers that have already decided every field, such as base image content rules whose whole purpose is to specify modes and ownership.

func (Recorder) ImportTar

func (r Recorder) ImportTar(tarFile string) error

func (Recorder) RegularFile

func (r Recorder) RegularFile(f io.Reader, info fs.FileInfo, target string) error

func (Recorder) RegularFileFromPath

func (r Recorder) RegularFileFromPath(filePath, target string) error

func (Recorder) RegularFromHeader added in v0.3.19

func (r Recorder) RegularFromHeader(hdr *tar.Header, content io.Reader) error

RegularFromHeader records a regular file from a caller-supplied tar header and an in-memory body. As with Header, the header is used verbatim.

func (Recorder) RegularFromHeaderAndPath added in v0.3.19

func (r Recorder) RegularFromHeaderAndPath(hdr *tar.Header, filePath string) error

RegularFromHeaderAndPath records a regular file from a caller-supplied tar header, with the content read from a file on disk. As with Header, the header is used verbatim.

func (r Recorder) Symlink(target, linkName string) error

func (Recorder) Tree

func (r Recorder) Tree(fsys fs.FS, target string) error

Tree records a directory tree (including all files and subdirectories). It creates a symlink in the tar file that points to the root of the tree.

func (Recorder) TreeFromPath

func (r Recorder) TreeFromPath(dirPath, target string) error

func (Recorder) WithMetadata

func (r Recorder) WithMetadata(metadata MetadataProvider) Recorder

WithMetadata returns a new Recorder with the given metadata provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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