Quark
#
Modules #
quark/action
quark/app
quark/bubbles
quark/buffer
quark/checkbox
quark/css
quark/ctr
quark/dialog
quark/event
quark/font
quark/fs
quark/http
quark/index
quark/keyboard
quark/media
quark/nav
quark/os
quark/path
quark/pkg
quark/screen
quark/stepper
quark/storage
quark/test
quark/types
quark/util
quark/view
quark/window
quark/_common
quark/_event
quark/_ext
quark/_util
Quark v1.2.0 Documentation
Table of Contents
quark/os #
Enum: NetworkInterface #
NetworkInterface #
kNone
NonekETH
EthernetkMobile
Mobilek2G
Mobile 2Gk3G
Mobile 3Gk4G
Mobile 4Gk5G
Mobile 5G
arch() #
Get CPU arch type
@return
string
name() #
Get OS name, For: Android
/iOS
/MacOSX
/Linux
@return
string
version() #
Get OS version info
@return
string
brand() #
Get the Device brand, For: Apple/Huawei
@return
string
model() #
Get OS model, iPad/iPhone/Mac16,10
@return
string
info() #
Get OS information
For example:
// Prints:
// sysname: Louis-iPhone
// sysname: Darwin
// machine: iPhone7,2
// nodename: Louis-iPhone
// version: Darwin Kernel Version 16.6.0: Mon Apr 17 17:33:35 PDT 2017; root:xnu-3789.60.24~24/RELEASE_ARM64_T7000
// release: 16.6.0
console.log(os.info());
@return
string
languages() #
Get List of OS supported languages, May value is 'en-us'
|'zh-cn'
|'zh-tw'
@return
string
[]
isWifi() #
Is it a wifi network type?
@return
boolean
isMobile() #
Is it a mobile network type?
@return
boolean
networkInterface() #
Get the network interface
@return
NetworkInterface
isAcPower() #
Is there an external power supply connected?
@return
boolean
isBattery() #
Is there a battery device?
@return
boolean
batteryLevel() #
Get battery power percentage if have a battery
@return
number
range 0 to 1
memory() #
Get the memory total
@return
number
usedMemory() #
Get the used memory size
@return
number
availableMemory() #
Get the available memory size
@return
number
cpuUsage() #
Get CPU usage percentage
@return
number