file

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 6 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists added in v0.1.9

func Exists(path string) bool

func ExtendCommandEnvironment added in v0.2.0

func ExtendCommandEnvironment(cmd *exec.Cmd, env map[string]string)

func Read added in v0.1.9

func Read(filename string) ([]byte, error)

Read wraps calls to os.ReadFile, ensuring that errors are wrapped in a stack trace

func ReadString added in v0.1.9

func ReadString(filename string) (string, error)

ReadString wraps calls to os.ReadFile, ensuring that errors are wrapped in a stack trace

func RunCommand added in v0.2.0

func RunCommand(cmd *exec.Cmd) (string, error)

func RunCommandWithPipes added in v0.2.0

func RunCommandWithPipes(cmd *exec.Cmd) error

RunCommandWithPipes runs a long running command and continuously streams its output

func Write added in v0.1.9

func Write(filename string, bytes []byte, perm fs.FileMode) error

Write wraps calls to os.WriteFile, ensuring that errors are wrapped in a stack trace

func WriteString added in v0.1.9

func WriteString(filename string, contents string, perm fs.FileMode) error

WriteString wraps calls to os.WriteFile, ensuring that errors are wrapped in a stack trace

Types

This section is empty.

Jump to

Keyboard shortcuts

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