Documentation ¶
Index ¶
Constants ¶
const OPAQUE_WHITEOUT_FILENAME = ".wh..wh..opq"
The filename used to specify that a file is an opaque whiteout file
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 ¶
Copies the attributes of the source file or directory to the target file or directory
func IsWhiteout ¶
Determines whether the given filename represents a whiteout file or opaque whiteout file
func MirrorFileWithAttributes ¶
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 ¶
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