pkgutil

package
v1.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyPackage

func CopyPackage(src, dst string, copyRootKptfile bool) error

CopyPackage copies the content of a single package from src to dst. It will not copy resources belonging to any subpackages.

func CopyPackageWithSubpackages

func CopyPackageWithSubpackages(src, dst string) error

func Exists

func Exists(path string) (bool, error)

Exists returns true if a file or directory exists on the provided path, and false otherwise.

func FindSubpackagesForPaths

func FindSubpackagesForPaths(matcher pkg.SubpackageMatcher, recurse bool, pkgPaths ...string) ([]string, error)

FindSubpackagesForPaths traverses the provided package paths and finds all subpackages using the provided pkgLocatorFunc

func RemovePackageContent

func RemovePackageContent(path string, removeRootKptfile bool) error

func RootPkgFirstSorter

func RootPkgFirstSorter(paths []string) func(i, j int) bool

RootPkgFirstSorter returns a "less" function that can be used with the sort.Slice function to correctly sort package paths so parent packages are always before subpackages.

func SubPkgFirstSorter

func SubPkgFirstSorter(paths []string) func(i, j int) bool

SubPkgFirstSorter returns a "less" function that can be used with the sort.Slice function to correctly sort package paths so subpackages are always before parent packages.

func WalkPackage

func WalkPackage(src string, c func(string, os.FileInfo, error) error) error

WalkPackage walks the package defined at src and provides a callback for every folder and file. Any subpackages and the .git folder are excluded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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