os.platform()
- 返回: <string>
返回标识操作系统平台的字符串。
该值在编译时设置。
可能的值有 'aix'
、 'darwin'
、 'freebsd'
、 'linux'
、 'openbsd'
、 'sunos'
和 'win32'
。
返回的值等价于 process.platform
。
如果 Node.js 在 Android 操作系统上构建,则也可能返回 'android'
值。
Android 的支持是实验性的。
- Returns: <string>
Returns a string identifying the operating system platform. The value is set
at compile time. Possible values are 'aix'
, 'darwin'
, 'freebsd'
,
'linux'
, 'openbsd'
, 'sunos'
, and 'win32'
.
The return value is equivalent to process.platform
.
The value 'android'
may also be returned if Node.js is built on the Android
operating system. Android support is experimental.