From 3c15ba74c425b2d8a82c262e49ea2788f116f31d 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 --- doc/api/os.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/doc/api/os.md b/doc/api/os.md index 43e71460c24471..7e92f2bf434e37 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,33 +183,54 @@ 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. ## os.userInfo([options]) + * `options` {Object} * `encoding` {String} Character encoding used to interpret resulting strings.