|
⇤ ← Revision 1 as of 2023-02-24 20:13:59
Size: 1074
Comment:
|
Size: 1470
Comment: Reorg
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| = Node Os = | = Node os = The '''`os`''' module includes tools for interacting with the host OS. |
| Line 9: | Line 11: |
| == AvailableParallelism == ---- == Arch == ---- == Constants == `os.constants.signals` `os.constants.errno` `os.constants.dlopen` `os.constants.priority` ---- == Cpus == ---- == DevNull == ---- == Endianness == ---- == Eol == ---- == FreeMem == ---- == GetPriority == ---- == HomeDir == |
== Example == |
| Line 83: | Line 23: |
| == HostName == | == Constants == ||'''Constants''' ||'''Description'''|| ||`os.devNull` ||null device || ||`os.EOL` ||OS-specific end of line character|| ||`os.constants.signals` || || ||`os.constants.errno` || || ||`os.constants.dlopen` || || ||`os.constants.priority`|| || |
| Line 89: | Line 37: |
| == LoadAvg == | == Functions == |
| Line 91: | Line 39: |
| ---- | ||'''Function''' ||'''Description'''|| ||`availableParallelism`|| || ||`arch` || || ||`cpus` || || ||`endianness` || || ||`freemem` || || ||`getPriority` || || ||`homedir` || || ||`hostname` || || ||`loadavg` || || ||`machine` || || ||`networkInferfaces` || || ||`platform` || || ||`release` || || ||`setPriority` || || ||`tmpdir` || || ||`totalmem` || || ||`type` || || ||`uptime` || || ||`userinfo` || || ||`version` || || |
| Line 93: | Line 61: |
== Machine == ---- == NetworkInferfaces == ---- == Platform == ---- == Release == ---- == SetPriority == ---- == TmpDir == ---- == TotalMem == ---- == Type == ---- == Uptime == ---- == UserInfo == ---- == Version == |
Node os
The os module includes tools for interacting with the host OS.
Example
const os = require("os");
const path = require("path");
const myDocuments = path.join(os.homedir(), "Documents");
Constants
Constants |
Description |
os.devNull |
null device |
os.EOL |
OS-specific end of line character |
os.constants.signals |
|
os.constants.errno |
|
os.constants.dlopen |
|
os.constants.priority |
|
Functions
Function |
Description |
availableParallelism |
|
arch |
|
cpus |
|
endianness |
|
freemem |
|
getPriority |
|
homedir |
|
hostname |
|
loadavg |
|
machine |
|
networkInferfaces |
|
platform |
|
release |
|
setPriority |
|
tmpdir |
|
totalmem |
|
type |
|
uptime |
|
userinfo |
|
version |
|
