Documentation ¶
Overview ¶
Package mebroutines contains general routines used by various MEB helper utilities
Index ¶
- func ChdirHomeDirectory() bool
- func ChdirVagrantDirectory() bool
- func Close(c io.Closer)
- func CopyFile(src, dst string) (err error)
- func CreateDir(path string) error
- func CreateFile(path string) error
- func ExistsCharDevice(path string) bool
- func ExistsDir(path string) bool
- func ExistsFile(path string) bool
- func ExistsStdin() bool
- func ExtractDiskFreeDarwin(dfOutput string) (uint64, error)
- func ExtractDiskFreeLinux(dfOutput string) (uint64, error)
- func ExtractDiskFreeWindows(wmiData []Win32_LogicalDisk) (uint64, error)
- func GetDiskFree(path string) (uint64, error)
- func GetHomeDirectory() string
- func GetMebshareDirectory() string
- func GetVagrantDirectory() string
- func GetVagrantPath() string
- func GetVagrantdDirectory() string
- func GetVirtualBoxHiddenDirectory() string
- func GetVirtualBoxVMsDirectory() string
- func IfFoundVBoxManage() bool
- func IfFoundVagrant() bool
- func IfIntlCharsInPath(path string) bool
- func OpenMebShare()
- func RemoveDir(path string) error
- func Run(commandArgs []string) error
- func RunAndGetError(commandArgs []string) (string, error)
- func RunAndGetOutput(commandArgs []string, showWarningOnError bool) (string, error)
- func RunVBoxManage(args []string) string
- func RunVagrant(args []string)
- func SetMainWindow(win *ui.Window)
- func ShowErrorMessage(message string)
- func ShowInfoMessage(message string)
- func ShowWarningMessage(message string)
- type Win32_LogicalDisk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChdirHomeDirectory ¶
func ChdirHomeDirectory() bool
ChdirHomeDirectory changes current working directory to home directory
func ChdirVagrantDirectory ¶
func ChdirVagrantDirectory() bool
ChdirVagrantDirectory changes current working directory to vagrant path (ktp)
func ExistsCharDevice ¶ added in v1.11.0
ExistsCharDevice returns true if given file is a Linux device file
func ExtractDiskFreeDarwin ¶ added in v1.8.1
ExtractDiskFreeDarwin extracts free disk space from a given df output
func ExtractDiskFreeLinux ¶ added in v1.8.1
ExtractDiskFreeLinux extracts free disk space from a given df output
func ExtractDiskFreeWindows ¶ added in v1.8.1
func ExtractDiskFreeWindows(wmiData []Win32_LogicalDisk) (uint64, error)
ExtractDiskFreeWindows extracts free disk space from a given WMI query result slice
func GetDiskFree ¶
GetDiskFree returns available disk space
func GetMebshareDirectory ¶
func GetMebshareDirectory() string
GetMebshareDirectory returns ktp-jako path from under home directory
func GetVagrantDirectory ¶
func GetVagrantDirectory() string
GetVagrantDirectory returns ktp-directory path from under home directory
func GetVagrantPath ¶ added in v1.8.1
func GetVagrantPath() string
GetVagrantPath returns path for Vagrant binary
func GetVagrantdDirectory ¶
func GetVagrantdDirectory() string
GetVagrantdDirectory returns .vagrantd-directory path from under home directory
func GetVirtualBoxHiddenDirectory ¶
func GetVirtualBoxHiddenDirectory() string
GetVirtualBoxHiddenDirectory returns ".VirtualBox" path from under home directory
func GetVirtualBoxVMsDirectory ¶
func GetVirtualBoxVMsDirectory() string
GetVirtualBoxVMsDirectory returns "VirtualBox VMs" path from under home directory
func IfFoundVBoxManage ¶
func IfFoundVBoxManage() bool
IfFoundVBoxManage returns true if vboxmanage can be found in path
func IfFoundVagrant ¶
func IfFoundVagrant() bool
IfFoundVagrant returns true if Vagrant can be found in path
func IfIntlCharsInPath ¶
IfIntlCharsInPath returns true if path contains non-ASCII characters
func OpenMebShare ¶
func OpenMebShare()
OpenMebShare command executes command that opens file browser to meb share directory
func RunAndGetError ¶
RunAndGetError runs command with arguments and returns error code
func RunAndGetOutput ¶
RunAndGetOutput runs command with arguments and returns output as a string
func RunVBoxManage ¶
RunVBoxManage runs vboxmanage command with given arguments
func SetMainWindow ¶
SetMainWindow sets libui main window pointer used by ShowErrorMessage and ShowWarningMessage
func ShowErrorMessage ¶
func ShowErrorMessage(message string)
ShowErrorMessage shows error message popup to user
func ShowInfoMessage ¶
func ShowInfoMessage(message string)
ShowInfoMessage shows warning message popup to user
func ShowWarningMessage ¶
func ShowWarningMessage(message string)
ShowWarningMessage shows warning message popup to user
Types ¶
type Win32_LogicalDisk ¶ added in v1.8.1
Win32_LogicalDisk is a struct used to query Windows WMI (Windows Management Instrumentation) The struct must be named with an underscore, otherwise it is not recognised and results "Invalid class" exception.