fsutil

package
v0.0.0-...-6489ed8 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExec

func CheckExec(command string, commandLine ...string) error

Checks for successful execution. Logs all output at default level.

func CheckExecWithEnv

func CheckExecWithEnv(env []string, command string, commandLine ...string) error

func CheckExecWithOutput

func CheckExecWithOutput(command string, commandLine ...string) (string, string, error)

Check for successful execution and return stdout and stderr as strings

func GetFilePerms

func GetFilePerms(filename string) (os.FileMode, error)

func GetFileSize

func GetFileSize(filename string) (int64, error)

func Interrupt

func Interrupt()

Calling this closes the interrupt channel, causes all executing processes to die (with a panic). This let's deferred clean up handlers run in the owning goroutine.

func LoggedCommand

func LoggedCommand(command string, commandLine ...string) *exec.Cmd

Returns a command object which logs its stdout/stderr

func MustExec

func MustExec(command string, commandLine ...string)

Exit program if execution is not successful

func MustExecWithEnv

func MustExecWithEnv(env []string, command string, commandLine ...string)

func MustExecWithOutput

func MustExecWithOutput(command string, commandLine ...string) (string, string)

func MustExecutableFolder

func MustExecutableFolder() string

Get the current executable's folder or fail

func MustGetFileSize

func MustGetFileSize(filename string) int64

func MustLookupPaths

func MustLookupPaths(paths ...string)

Exit Panicly if paths do not exist as command executables

func MustPathExist

func MustPathExist(paths ...string)

Exit Panicly if path does not exist

func MustPathNotExist

func MustPathNotExist(paths ...string)

Exit Panicly if path exists

func PathExists

func PathExists(path string) bool

Path does not exist

func PathIsDir

func PathIsDir(path string) bool

func PathIsSocket

func PathIsSocket(path string) bool

func PathNotExist

func PathNotExist(path string) bool

Path exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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