Documentation ¶
Index ¶
- func Connections(parent *proclib.Process) []netlib.Connection
- func DetectOS() string
- func Exec(executable string, disown bool) (string, error)
- func Files(path string) (files []filelib.File, err error)
- func Import() script.Library
- func Include() script.Option
- func Library() script.Library
- func OpenFile(filePath string) (file.Type, error)
- func Processes() (procs []proclib.Process)
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connections ¶
func Connections(parent *proclib.Process) []netlib.Connection
Connections uses the gopsutil/net to get all connections created by a process (or all by default).
@callable: sys.connections @param: parent @?Process @retval: connections @[]Connection
@usage: connections = sys.connections()
func DetectOS ¶ added in v0.2.3
func DetectOS() string
DetectOS uses the GOOS variable to determine the OS.
@callable: sys.detectOS @retval: os @string
@usage: os = sys.detectOS()
func Exec ¶
Exec uses the os/exec.command to execute the passed executable/params.
@callable: sys.exec @param: executable @String @param: disown @?Bool @retval: output @String @retval: err @Error
@usage: output = sys.exec("/usr/sbin/nginx", disown=True)
func Files ¶ added in v0.3.0
Files uses the ioutil.ReadDir to get all files in a given path.
@callable: sys.files @retval: files @[]File
@usage: files = sys.files()
func Import ¶
@DEPRECATE Import the sys library to enable scripts to access low level system functionality.
func Library ¶ added in v0.3.0
Library prepares a new sys library for use within a script environment.