copyutil

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

The copyutil package contains libraries for copying directories of configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 added in v0.9.0

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 added in v0.1.7

func PrettyFileDiff(s1, s2 string) string

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

func SyncFile added in v0.1.6

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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