Doc - PeterOS


_G.pos

Variables

Type Name Description
Logger log OS log

Functions

Return Name Description
string getVersion() Get the operating system version
string relizePath(path: string) Realize relative path to absolute
table require(path: string) Version of require(path) but includes things in /os/ and /os/lib/

_G.user

Functions

Return Name Description
boolean isSu() Returns if the SuperUser is currently logged in
boolean sudo(psw: string) Tries to set user to SuperUser, using given password
boolean setSuPass(cPass: string, nPass: string) Tries to change the SuperUser password to nPass, if cPass is the current password
boolean hasPerm(perm: string) Checks if the current user has the given permission
boolean changeUser(name: string, pass: string) Attempt to change user given username and password
LocalUser getUser() Returns the current user

_G.pgm

Base path for program packages