fileutil

package
v0.1.57 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GOOSWindows = "windows"
)

Variables

This section is empty.

Functions

func ChownRToUser added in v0.1.53

func ChownRToUser(path string) error

func ChownToUser added in v0.1.53

func ChownToUser(path string) error

func CopyFile added in v0.1.53

func CopyFile(source, dest string, perm fs.FileMode) error

CopyFile that does Chown when needed to drop sudo privileges.

func FindMatchingBaseDir

func FindMatchingBaseDir(path string, matching []string, stopDir string) string

func FindSubdirsOfMatching

func FindSubdirsOfMatching(path string, matching []string) []string

func FindYAML

func FindYAML(path string) string

func FindYAMLFiles

func FindYAMLFiles(path string, name ...string) []string

func FindYAMLGoingUp

func FindYAMLGoingUp(path, name string) string

func IsRelativeSubdir added in v0.1.11

func IsRelativeSubdir(parent, dir string) bool

func LchownRToUser added in v0.1.53

func LchownRToUser(path string) error

func LchownToUser added in v0.1.53

func LchownToUser(path string) error

func Mkdir added in v0.1.53

func Mkdir(path string, perm os.FileMode) error

Mkdir that does Chown when needed to drop sudo privileges.

func MkdirAll added in v0.1.53

func MkdirAll(path string, perm os.FileMode) error

MkdirAll that does Chown when needed to drop sudo privileges.

func Symlink(oldname, newname string) error

Symlink that does Chown when needed to drop sudo privileges.

func WriteFile added in v0.1.53

func WriteFile(filename string, data []byte, perm fs.FileMode) error

WriteFile that does Chown when needed to drop sudo privileges.

func YAMLError

func YAMLError(path, msg string, data []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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