Node的os模块
收录一下node的os模块:
[*]os.platform()
当前操作系统平台 、 mac下面返回的是:darwin,windows是:win32
[*]os.freemem()
内存总数,字节为单位
[*]os.type()
获取操作系统类型,mac下是 Darwin
[*]os.totalmem()
空闲内存总数,字节为单位
[*]os.networkInterfaces()
返回一个二维码数组
扩展阅读:
http://blog.csdn.net/notejs/article/details/8754901
http://nodejs.org/api/os.html#os_os_networkinterfaces
http://shouce.w3cfuns.com/nodejs/os.html#os_Module_
页:
[1]