Quark
#
Modules #
quark/actionquark/appquark/bubblesquark/bufferquark/checkboxquark/cssquark/ctrquark/dialogquark/eventquark/fontquark/fsquark/hashquark/httpquark/indexquark/jsonbquark/keyboardquark/mediaquark/navquark/netquark/osquark/pathquark/pkgquark/screenquark/stepperquark/storagequark/testquark/typesquark/utilquark/viewquark/windowquark/wsquark/_bufferquark/_commonquark/_eventquark/_extquark/_md5quark/_sha1quark/_sha256quark/_utilquark/_watching
Quark v1.3.0 Documentation
Table of Contents
quark/os #
Enum: NetworkInterface #
NetworkInterface #
kNoneNonekETHEthernetkMobileMobilek2GMobile 2Gk3GMobile 3Gk4GMobile 4Gk5GMobile 5G
arch() #
Get CPU arch type
@returnstring
name() #
Get OS name, For: Android/iOS/MacOSX/Linux
@returnstring
version() #
Get OS version info
@returnstring
brand() #
Get the Device brand, For: Apple/Huawei
@returnstring
model() #
Get OS model, iPad/iPhone/Mac16,10
@returnstring
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());
@returnstring
languages() #
Get List of OS supported languages, May value is 'en-us'|'zh-cn'|'zh-tw'
@returnstring[]
isWifi() #
Is it a wifi network type?
@returnboolean
isMobile() #
Is it a mobile network type?
@returnboolean
networkInterface() #
Get the network interface
@returnNetworkInterface
isAcPower() #
Is there an external power supply connected?
@returnboolean
isBattery() #
Is there a battery device?
@returnboolean
batteryLevel() #
Get battery power percentage if have a battery
@returnnumberrange 0 to 1
memory() #
Get the memory total
@returnnumber
usedMemory() #
Get the used memory size
@returnnumber
availableMemory() #
Get the available memory size
@returnnumber
cpuUsage() #
Get CPU usage percentage
@returnnumber