System (sys)

sys

System functions: logging, sleep, time, memory, process control, clipboard, toast notifications.

30 functions Lua 5.3
sys.sys.alert
sys.alert(msg [, title [, timeout]])
Show blocking alert dialog.
sys.sys.available_memory
sys.available_memory()
Get available memory in megabytes.
sys.sys.cfversion
sys.cfversion()
Get CoreFoundation version number.
sys.sys.ctlbyname
sys.ctlbyname(name)
Read sysctl parameter.
sys.sys.free_disk_space
sys.free_disk_space([path])
Get free disk space in megabytes.
sys.sys.input_box
sys.input_box(title, msg, type, default)
Show input dialog with text field.
sys.sys.input_text
sys.input_text(text [, press_enter])
Paste text via clipboard + Cmd+V key simulation. Supports Unicode/Vietnamese.
sys.sys.kill
sys.kill(pid [, signal])
Send signal to a process.
sys.sys.killall
sys.killall(name [, signal])
Kill all processes matching name.
sys.sys.lchmod_r
sys.lchmod_r(path, mode)
Recursively change permissions of path and all children using chmod().
sys.sys.lchown_r
sys.lchown_r(path, uid, gid)
Recursively change ownership of path and all children using lchown() (does not follow symlinks).
sys.sys.lchownmod_r
sys.lchownmod_r(path, uid, gid, mode)
Recursively change ownership AND permissions in one call. Combines sys.lchown_r + sys.lchmod_r.
sys.sys.log
sys.log(msg)
Write message to daemon log file.
sys.sys.memory_info
sys.memory_info()
Get detailed memory information.
sys.sys.mgcopyanswer
sys.mgcopyanswer(key)
Query MobileGestalt system info.
sys.sys.mkdir_p
sys.mkdir_p(path)
Create directory recursively (like mkdir -p).
sys.sys.msleep
sys.msleep(ms)
Pause script execution for specified milliseconds. Stop-safe (responds to stop within 100ms).
sys.sys.mtime
sys.mtime()
Get current time in milliseconds.
sys.sys.net_time
sys.net_time()
Get NTP-synced network time.
sys.sys.rnd
sys.rnd()
Generate random unsigned 32-bit integer.
sys.sys.run_encrypted
sys.run_encrypted(path)
Run encrypted .vntp package. Decrypts to temp directory, executes main.lua, cleans up temp dir regardless of outcome.
sys.sys.sleep
sys.sleep(seconds)
Pause script execution for specified seconds. Stop-safe.
sys.sys.task
sys.task(cmd [, timeout])
Execute shell command.
sys.sys.time
sys.time()
Get current UNIX timestamp.
sys.sys.toast
sys.toast(msg [, duration]) | sys.toast(config_table)
Show toast notification. Supports simple string or detailed config table.
sys.sys.toast_style
sys.toast_style(config)
Set default style for all subsequent sys.toast() calls.
sys.sys.total_disk_space
sys.total_disk_space([path])
Get total disk space in megabytes.
sys.sys.version
sys.version()
Get iOS version string.
sys.sys.vnversion
sys.vnversion()
Get VNTouch version.
sys.sys.jbroot
Returns the jailbreak root path resolved via libroot. Without arguments, returns the jbroot prefix. With a path argument…