...

Package copyutil

import "sigs.k8s.io/kustomize/kyaml/copyutil"
Overview
Index

Overview ▾

The copyutil package contains libraries for copying directories of configuration.

func CopyDir

func CopyDir(fSys filesys.FileSystem, src string, dst string) error

CopyDir copies a src directory to a dst directory. CopyDir skips copying the .git directory from the src.

func Diff

func Diff(sourceDir, destDir string) (sets.String, error)

Diff returns a list of files that differ between the source and destination.

Diff is guaranteed to return a non-empty set if any files differ, but this set is not guaranteed to contain all differing files.

func IsDotGitFolder

func IsDotGitFolder(path string) bool

IsDotGitFolder checks if the provided path is either the .git folder or a file underneath the .git folder.

func PrettyFileDiff

func PrettyFileDiff(s1, s2 string) string

PrettyFileDiff takes the content of two files and returns the pretty diff

func SyncFile

func SyncFile(src, dst string) error

SyncFile copies file from src file path to a dst file path by replacement deletes dst file if src file doesn't exist