object OS extends Object with OS
Operating System Singleton
- Annotations
- @native() @JSImport("os", JSImport.Namespace)
- Alphabetic
- By Inheritance
- OS
- OS
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def EOL: String
A constant defining the appropriate End-of-line marker for the operating system.
A constant defining the appropriate End-of-line marker for the operating system.
- \n on POSIX
- \r\n on Windows
- Definition Classes
- OS
os.EOL
Example: - def arch(): String
Returns the operating system CPU architecture.
Returns the operating system CPU architecture. Possible values are 'x64', 'arm' and 'ia32'. Returns the value of process.arch.
- Definition Classes
- OS
os.arch()
Example: - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def constants: OSConstants
Returns an object containing commonly used operating system specific constants for error codes, process signals, and so on.
Returns an object containing commonly used operating system specific constants for error codes, process signals, and so on. The specific constants currently defined are described in OS Constants.
- Definition Classes
- OS
- See also
https://nodejs.org/api/os.html#os_os_constants_1
- def cpus(): Array[CPUInfo]
Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).
Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).
- Definition Classes
- OS
os.cpus()
Example: - def endianness(): String
Returns the endianness of the CPU.
Returns the endianness of the CPU. Possible values are 'BE' for big endian or 'LE' for little endian.
- Definition Classes
- OS
os.endianness()
Example: - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def freemem(): Double
Returns the amount of free system memory in bytes.
Returns the amount of free system memory in bytes.
- Definition Classes
- OS
os.freemem()
Example: - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getPriority(): Int
- Definition Classes
- OS
- def getPriority(pid: Int): Int
- Definition Classes
- OS
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def homedir(): String
Returns the home directory of the current user.
Returns the home directory of the current user.
- Definition Classes
- OS
os.homedir()
Example: - def hostname(): String
Returns the hostname of the operating system.
Returns the hostname of the operating system.
- Definition Classes
- OS
os.hostname()
Example: - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- def loadavg(): Array[Int]
Returns an array containing the 1, 5, and 15 minute load averages.
Returns an array containing the 1, 5, and 15 minute load averages.
The load average is a measure of system activity, calculated by the operating system and expressed as a fractional number. As a rule of thumb, the load average should ideally be less than the number of logical CPUs in the system.
The load average is a very UNIX-y concept; there is no real equivalent on Windows platforms. That is why this function always returns [0, 0, 0] on Windows.
- Definition Classes
- OS
os.loadavg()
Example: - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def networkInterfaces(): Dictionary[Array[NetworkInterface]]
Get a list of network interfaces
Get a list of network interfaces
- Definition Classes
- OS
os.networkInterfaces()
Example: - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def platform(): String
Returns the operating system platform.
Returns the operating system platform. Possible values are 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'. Returns the value of process.platform.
- Definition Classes
- OS
os.platform()
Example: - def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- def release(): String
Returns the operating system release.
Returns the operating system release.
- Definition Classes
- OS
os.release()
Example: - def setPriority(priority: Int): Unit
- Definition Classes
- OS
- def setPriority(pid: Int, priority: Int): Unit
- Definition Classes
- OS
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tmpdir(): String
Returns the operating system's default directory for temporary files.
Returns the operating system's default directory for temporary files.
- Definition Classes
- OS
os.tmpdir()
Example: - def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def totalmem(): Double
Returns the total amount of system memory in bytes.
Returns the total amount of system memory in bytes.
- Definition Classes
- OS
os.totalmem()
Example: - def type(): String
Returns the operating system name.
Returns the operating system name. For example 'Linux' on Linux, 'Darwin' on OS X and 'Windows_NT' on Windows.
- Definition Classes
- OS
os.type()
Example: - def uptime(): Int
Returns the system uptime in seconds.
Returns the system uptime in seconds.
- Definition Classes
- OS
os.uptime()
Example: - def userInfo(): UserInfoObject
- Definition Classes
- OS
- def userInfo(options: UserInfoOptions): UserInfoObject
The os.userInfo() method returns information about the currently effective user -- on POSIX platforms, this is typically a subset of the password file.
The os.userInfo() method returns information about the currently effective user -- on POSIX platforms, this is typically a subset of the password file. The returned object includes the username, uid, gid, shell, and homedir. On Windows, the uid and gid fields are -1, and shell is null.
The value of homedir returned by os.userInfo() is provided by the operating system. This differs from the result of os.homedir(), which queries several environment variables for the home directory before falling back to the operating system response.
- returns
- Definition Classes
- OS
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()