Skip to content

Commit 8b53f4b

Browse files
benglMyles Borins
authored and
Myles Borins
committed
doc: add added: information for os
Via git spelunking, mostly. Some functions have been renamed. Used the version in which they were renamed. Ref: #6578 PR-URL: #6609 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
1 parent 78d361b commit 8b53f4b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

doc/api/os.md

+45
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,25 @@ Provides a few basic operating-system related utility functions.
77
Use `require('os')` to access this module.
88

99
## os.EOL
10+
<!-- YAML
11+
added: v0.7.8
12+
-->
1013

1114
A constant defining the appropriate End-of-line marker for the operating
1215
system.
1316

1417
## os.arch()
18+
<!-- YAML
19+
added: v0.5.0
20+
-->
1521

1622
Returns the operating system CPU architecture. Possible values are `'x64'`,
1723
`'arm'` and `'ia32'`. Returns the value of [`process.arch`][].
1824

1925
## os.cpus()
26+
<!-- YAML
27+
added: v0.3.3
28+
-->
2029

2130
Returns an array of objects containing information about each CPU/core
2231
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
95104
all processors are always 0.
96105

97106
## os.endianness()
107+
<!-- YAML
108+
added: v0.9.4
109+
-->
98110

99111
Returns the endianness of the CPU. Possible values are `'BE'` for big endian
100112
or `'LE'` for little endian.
101113

102114
## os.freemem()
115+
<!-- YAML
116+
added: v0.3.3
117+
-->
103118

104119
Returns the amount of free system memory in bytes.
105120

106121
## os.homedir()
122+
<!-- YAML
123+
added: v2.3.0
124+
-->
107125

108126
Returns the home directory of the current user.
109127

110128
## os.hostname()
129+
<!-- YAML
130+
added: v0.3.3
131+
-->
111132

112133
Returns the hostname of the operating system.
113134

114135
## os.loadavg()
136+
<!-- YAML
137+
added: v0.3.3
138+
-->
115139

116140
Returns an array containing the 1, 5, and 15 minute load averages.
117141

@@ -124,6 +148,9 @@ Windows platforms. That is why this function always returns `[0, 0, 0]` on
124148
Windows.
125149

126150
## os.networkInterfaces()
151+
<!-- YAML
152+
added: v0.6.0
153+
-->
127154

128155
Get a list of network interfaces:
129156

@@ -156,29 +183,47 @@ Note that due to the underlying implementation this will only return network
156183
interfaces that have been assigned an address.
157184

158185
## os.platform()
186+
<!-- YAML
187+
added: v0.5.0
188+
-->
159189

160190
Returns the operating system platform. Possible values are `'darwin'`,
161191
`'freebsd'`, `'linux'`, `'sunos'` or `'win32'`. Returns the value of
162192
[`process.platform`][].
163193

164194
## os.release()
195+
<!-- YAML
196+
added: v0.3.3
197+
-->
165198

166199
Returns the operating system release.
167200

168201
## os.tmpdir()
202+
<!-- YAML
203+
added: v0.9.9
204+
-->
169205

170206
Returns the operating system's default directory for temporary files.
171207

172208
## os.totalmem()
209+
<!-- YAML
210+
added: v0.3.3
211+
-->
173212

174213
Returns the total amount of system memory in bytes.
175214

176215
## os.type()
216+
<!-- YAML
217+
added: v0.3.3
218+
-->
177219

178220
Returns the operating system name. For example `'Linux'` on Linux, `'Darwin'`
179221
on OS X and `'Windows_NT'` on Windows.
180222

181223
## os.uptime()
224+
<!-- YAML
225+
added: v0.3.3
226+
-->
182227

183228
Returns the system uptime in seconds.
184229

0 commit comments

Comments
 (0)