From 8b53f4b27ceeb3e8865a9dee28caf769a26f3331 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Thu, 5 May 2016 18:34:29 -0700 Subject: [PATCH] doc: add `added:` information for os Via git spelunking, mostly. Some functions have been renamed. Used the version in which they were renamed. Ref: https://github.com/nodejs/node/issues/6578 PR-URL: https://github.com/nodejs/node/pull/6609 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Stephen Belanger --- doc/api/os.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/doc/api/os.md b/doc/api/os.md index ea4f40ba79e958..42085356a89b6d 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -7,16 +7,25 @@ Provides a few basic operating-system related utility functions. Use `require('os')` to access this module. ## os.EOL + A constant defining the appropriate End-of-line marker for the operating system. ## os.arch() + Returns the operating system CPU architecture. Possible values are `'x64'`, `'arm'` and `'ia32'`. Returns the value of [`process.arch`][]. ## os.cpus() + Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of @@ -95,23 +104,38 @@ Note that since `nice` values are UNIX centric in Windows the `nice` values of all processors are always 0. ## os.endianness() + Returns the endianness of the CPU. Possible values are `'BE'` for big endian or `'LE'` for little endian. ## os.freemem() + Returns the amount of free system memory in bytes. ## os.homedir() + Returns the home directory of the current user. ## os.hostname() + Returns the hostname of the operating system. ## os.loadavg() + Returns an array containing the 1, 5, and 15 minute load averages. @@ -124,6 +148,9 @@ Windows platforms. That is why this function always returns `[0, 0, 0]` on Windows. ## os.networkInterfaces() + Get a list of network interfaces: @@ -156,29 +183,47 @@ Note that due to the underlying implementation this will only return network interfaces that have been assigned an address. ## os.platform() + Returns the operating system platform. Possible values are `'darwin'`, `'freebsd'`, `'linux'`, `'sunos'` or `'win32'`. Returns the value of [`process.platform`][]. ## os.release() + Returns the operating system release. ## os.tmpdir() + Returns the operating system's default directory for temporary files. ## os.totalmem() + Returns the total amount of system memory in bytes. ## os.type() + Returns the operating system name. For example `'Linux'` on Linux, `'Darwin'` on OS X and `'Windows_NT'` on Windows. ## os.uptime() + Returns the system uptime in seconds.