Documentation ¶
Index ¶
- Constants
- Variables
- func CreateDesktopShortcut(outpath, exepath, args, iconpath, name, comment string, startup bool) error
- func FileLock(file *os.File, exclusive, wait bool) error
- func FileUnlock(file *os.File) error
- func IconExt() string
- func OpenURL(url string) error
- func ProcAttrBackground() *os.ProcAttr
- func StdRedirect(stdin, stdout, stderr uintptr) error
- func SysConfDir(program string) string
- func UserConfDir(program string) string
- func UserDesktopDir() string
- func UserDesktopFile(program, iconname string) string
- func UserHomeDir() string
- func UserStartupDir() string
- func UserStartupFile(program, iconname string) string
- type SysEvent
- type SysEventNotifier
Constants ¶
View Source
const ( SysEventShutdown = iota SysEventIpAddrChanged )
Variables ¶
View Source
var (
ErrLockIsBusy = errors.New("Lock is busy")
)
Functions ¶
func CreateDesktopShortcut ¶
func CreateDesktopShortcut( outpath, exepath, args, iconpath, name, comment string, startup bool) error
Create desktop shortcut
Parameters are:
outpath Output path exepath Path to executable file args Arguments iconpath Path to icon file name Program name comment Comment startup Startup or desktop shortcut
func ProcAttrBackground ¶
Create os.ProcAttr to run process in background
func StdRedirect ¶
Redirect stdin/stdout/stderr
func SysConfDir ¶
Get system configuration directory for the program
func UserConfDir ¶
Get user configuration directory for the program
func UserDesktopFile ¶
Get user desktop file for the program
func UserStartupFile ¶
Get user startup file for the program
Types ¶
type SysEventNotifier ¶
type SysEventNotifier struct {
// contains filtered or unexported fields
}
System events notifier
func NewSysEventNotifier ¶
func NewSysEventNotifier(callback func(SysEvent)) *SysEventNotifier
Create new SysEventNotifier
Click to show internal directories.
Click to hide internal directories.