layer

package
v0.0.0-...-4e67346 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const OPAQUE_WHITEOUT_FILENAME = ".wh..wh..opq"

The filename used to specify that a file is an opaque whiteout file

View Source
const WHITEOUT_FILENAME_PREFIX = ".wh."

The prefix used to specify that a file is a whiteout file

Variables

This section is empty.

Functions

func CopyAttributes

func CopyAttributes(source string, target string, details fs.DirEntry) error

Copies the attributes of the source file or directory to the target file or directory

func IsWhiteout

func IsWhiteout(filename string) bool

Determines whether the given filename represents a whiteout file or opaque whiteout file

func MirrorFileWithAttributes

func MirrorFileWithAttributes(source string, target string, details fs.DirEntry) error

Mirrors the source file in the target location and preserves its attributes (Note that this function uses hardlinks where possible to avoid duplicating data)

func WhiteoutForFile

func WhiteoutForFile(filename string) string

Generates the filename for a whiteout file given the filename of the original file

Types

type DiffApplier

type DiffApplier struct {

	// The absolute path to the root directory for the base filesystem layer
	BaseDir string

	// The absolute path to the root directory for the diff to be applied against the base filesystem layer
	DiffDir string

	// The absolute path to the root directory in which to place the merged output
	MergedDir string
}

Provides functionality for applying a filesystem diff against a base filesystem layer

func (*DiffApplier) ApplyRecursive

func (apply *DiffApplier) ApplyRecursive(subpath string, subpathDetails fs.DirEntry, whiteoutInParent bool) <-chan error

Recursively applies the diff for a given filesystem subpath to the contents of the base filesystem layer

type DiffGenerator

type DiffGenerator struct {

	// The absolute path to the root directory for the base filesystem layer
	BaseDir string

	// The absolute path to the root directory of the modified files to be compared against the base filesystem layer
	ModifiedDir string

	// The absolute path to the root directory in which to place the generated filesystem diff
	DiffDir string
}

Provides functionality for generating a filesystem diff by comparing modified files to a base filesystem layer

func (*DiffGenerator) DiffRecursive

func (diff *DiffGenerator) DiffRecursive(subpath string, subpathDetails fs.DirEntry, dirAdded bool) <-chan error

Recursively computes the diff for a given filesystem subpath compared to the contents of the base filesystem layer

Jump to

Keyboard shortcuts

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