io

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Slash = "/"
)

Variables

This section is empty.

Functions

func CreateDirIfNotExist

func CreateDirIfNotExist(filePath string) error

Create dir recursively if not exist Note: input argument must be a file path

func IsBinary

func IsBinary(bytes []byte) bool

IsBinary returns true if a zero byte occurs within the first 8000 bytes (or the entire length if shorter). This is the same approach that git uses to determine if a file is binary.

func IsDir

func IsDir(path string) (bool, error)

IsDir checks whether the path is a dir

func IsFile

func IsFile(path string) (bool, error)

IsFile checks whether the path is a file

func IsFileOrDirExist

func IsFileOrDirExist(path string) bool

IsFileOrDirExist checks whether a file or a dir exists

func OutDir

func OutDir(path string) (string, error)

OutDir returns an absolute representation of path after dir check Returns absolute path including trailing '/' or error if path does not exist.

func ReadKustomizeInput

func ReadKustomizeInput(kustomizeDir string) (string, error)

Generate yaml with kustomize build

func ReadStdinInput

func ReadStdinInput() (string, error)

Read stdin content as string

func RenamePath

func RenamePath(oldPath, newPath string) error

RenamePath renames (moves) oldPath to newPath, and creates needed directories in newPath If newPath already exists, RenamePath will return an error

Types

This section is empty.

Jump to

Keyboard shortcuts

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