-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNwJsDemo_OS.sb
More file actions
42 lines (33 loc) · 1.47 KB
/
Copy pathNwJsDemo_OS.sb
File metadata and controls
42 lines (33 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
EnableExplicit
XIncludeFile "NwJsOs.sbi"
Procedure.s ToJsonString(o)
! return JSON.stringify(v_o);
EndProcedure
If IsNwJsAvailable() = #False
Debug "Sorry! NwJs is not available :-("
Else
Define EOL.s = NwJsOs::EOL()
Select EOL
Case #LF$ : EOL = "#LF$"
Case #CRLF$ : EOL = "#CRLF$"
Case #LFCR$ : EOL = "#LFCR$"
Default : EOL = "?"
EndSelect
Debug "EOL(): " + EOL + #CRLF$
Debug "Arch(): " + NwJsOs::Arch() + #CRLF$
Debug "Constants(): " + ToJsonString(NwJsOs::Constants()) + #CRLF$
Debug "Cpus(): " + ToJsonString(NwJsOs::Cpus()) + #CRLF$
Debug "Endianness(): " + NwJsOs::Endianness() + #CRLF$
Debug "Freemem(): " + NwJsOs::Freemem() + #CRLF$
Debug "Homedir(): " + NwJsOs::Homedir() + #CRLF$
Debug "Hostname(): " + NwJsOs::Hostname() + #CRLF$
Debug "LoadAvg(): " + ToJsonString(NwJsOs::LoadAvg()) + #CRLF$
Debug "NetworkInterfaces(): " + ToJsonString(NwJsOs::NetworkInterfaces()) + #CRLF$
Debug "Platform(): " + NwJsOs::Platform() + #CRLF$
Debug "Release(): " + NwJsOs::Release() + #CRLF$
Debug "Tmpdir(): " + NwJsOs::Tmpdir() + #CRLF$
Debug "Totalmem(): " + NwJsOs::Totalmem() + #CRLF$
Debug "Type(): " + NwJsOs::Type() + #CRLF$
Debug "Uptime(): " + NwJsOs::Uptime() + #CRLF$
Debug "UserInfo(): " + ToJsonString(NwJsOs::UserInfo()) + #CRLF$
EndIf