Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2023-02-24 20:13:59
Size: 1074
Comment:
Revision 3 as of 2025-12-19 20:59:02
Size: 1533
Comment: Added scoping
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'''||
||`os.availableParallelism`|| ||
||`os.arch` || ||
||`os.cpus` || ||
||`os.endianness` || ||
||`os.freemem` || ||
||`os.getPriority` || ||
||`os.homedir` || ||
||`os.hostname` || ||
||`os.loadavg` || ||
||`os.machine` || ||
||`os.networkInferfaces` || ||
||`os.platform` || ||
||`os.release` || ||
||`os.setPriority` || ||
||`os.tmpdir` || ||
||`os.totalmem` || ||
||`os.type` || ||
||`os.uptime` || ||
||`os.userinfo` || ||
||`os.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

os.availableParallelism

os.arch

os.cpus

os.endianness

os.freemem

os.getPriority

os.homedir

os.hostname

os.loadavg

os.machine

os.networkInferfaces

os.platform

os.release

os.setPriority

os.tmpdir

os.totalmem

os.type

os.uptime

os.userinfo

os.version


See also

Node API for os


CategoryRicottone

Node/Os (last edited 2025-12-19 20:59:02 by DominicRicottone)