Documentation
¶
Index ¶
- func EnsureDir(dir string) (err error)
- func EnsureDirEnh(dir string) (err error)
- func FileExists(name string) bool
- func GetCurrentDir() string
- func GetExcutablePath() string
- func GetExecutableDir() string
- func IsDirectory(path string) (bool, error)
- func IsEAccess(err error) bool
- func IsExitError(err error) (int, bool)
- func IsRegularFile(path string) (bool, error)
- func NormalizeDir(s string) string
- func RemoveDirRecursive(dir string) (err error)
- func Run(command string, arguments ...string) error
- func RunCommand(command string, readStdout bool, arguments ...string) (int, string, error)
- func RunWithOutput(command string, arguments ...string) (int, string, error)
- func Sudo(command string, arguments ...string) (int, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDirEnh ¶
EnsureDirEnh checks and creates the directory, via sudo if necessary.
func FileExists ¶
FileExists returns the existence of an directory or file
func GetCurrentDir ¶
func GetCurrentDir() string
GetCurrentDir returns the current workingFlag directory it should be equal with os.Getenv("PWD")
func GetExcutablePath ¶
func GetExcutablePath() string
GetExcutablePath returns the executable file path
func GetExecutableDir ¶
func GetExecutableDir() string
GetExecutableDir returns the executable file directory
func IsDirectory ¶
IsDirectory tests whether `path` is a directory or not
func IsRegularFile ¶
IsRegularFile tests whether `path` is a normal regular file or not
func RemoveDirRecursive ¶
RemoveDirRecursive removes a directory and any children it contains.
func RunCommand ¶
RunCommand runs an OS command
func RunWithOutput ¶
RunWithOutput runs an OS command and collect the result outputting
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.