MCPcopy
hub / github.com/kptdev/kpt / stageDirectory

Function stageDirectory

internal/util/diff/diff.go:353–357  ·  view source on GitHub ↗

stageDirectory creates a subdirectory of the provided path for temporary operations path is the parent staged directory and should already exist subpath is the subdirectory that should be created inside path

(path, subpath string)

Source from the content-addressed store, hash-verified

351// path is the parent staged directory and should already exist
352// subpath is the subdirectory that should be created inside path
353func stageDirectory(path, subpath string) (string, error) {
354 targetPath := filepath.Join(path, subpath)
355 err := os.Mkdir(targetPath, os.ModePerm)
356 return targetPath, err
357}
358
359// NameStagingDirectory assigns a name that matches the package source information
360func NameStagingDirectory(source, branch, sha string) string {

Callers 2

RunMethod · 0.85
GetPkgMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected