fileutil

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFileFromRNode

func CreateFileFromRNode(targetDir string, node *yaml.RNode) error

func CreateFileFromRObject

func CreateFileFromRObject(fp string, x runtime.Object) error

func EnsureDir

func EnsureDir(dirName string, create bool) error

func GetFullPath

func GetFullPath(targetDir, rp string) string

GetFullPath returns the path from where the binary is run used to create/update files in the filesystem

func GetPathFromRNode

func GetPathFromRNode(node *yaml.RNode) string

func GetRelativePath

func GetRelativePath(targetDir, fp string) string

GetRelativePath returns the path which kioutil would return the relative path in the package, used for comparisons

func ReadFile

func ReadFile(fileName string) ([]byte, error)

func ReadFiles

func ReadFiles(source string, recursive bool, match []string) ([]string, error)

func ResolveAbsAndRelPaths

func ResolveAbsAndRelPaths(path string) (string, string, error)

ResolveAbsAndRelPaths returns absolute and relative paths for input path

func ResourcesToPackageBuffer

func ResourcesToPackageBuffer(resources map[string]string, match []string) (*kio.PackageBuffer, error)

func UpdateFileFromRNode

func UpdateFileFromRNode(targetDir, data string, node *yaml.RNode) error

func UpdateFileFromRObject

func UpdateFileFromRObject(fp string, x runtime.Object) error

func WriteFileFromRNode added in v0.0.4

func WriteFileFromRNode(fp string, node *yaml.RNode) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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