Packages

object OS extends Object with OS

Operating System Singleton

Annotations
@native() @JSImport("os", JSImport.Namespace)
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OS
  2. OS
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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
    Example:
    1. os.EOL

  5. 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
    Example:
    1. os.arch()

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. 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

  9. 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
    Example:
    1. os.cpus()

  10. 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
    Example:
    1. os.endianness()

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. def freemem(): Double

    Returns the amount of free system memory in bytes.

    Returns the amount of free system memory in bytes.

    Definition Classes
    OS
    Example:
    1. os.freemem()

  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def getPriority(): Int
    Definition Classes
    OS
  17. def getPriority(pid: Int): Int
    Definition Classes
    OS
  18. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def homedir(): String

    Returns the home directory of the current user.

    Returns the home directory of the current user.

    Definition Classes
    OS
    Example:
    1. os.homedir()

  21. def hostname(): String

    Returns the hostname of the operating system.

    Returns the hostname of the operating system.

    Definition Classes
    OS
    Example:
    1. os.hostname()

  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  24. 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
    Example:
    1. os.loadavg()

  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def networkInterfaces(): Dictionary[Array[NetworkInterface]]

    Get a list of network interfaces

    Get a list of network interfaces

    Definition Classes
    OS
    Example:
    1. os.networkInterfaces()

  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. 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
    Example:
    1. os.platform()

  30. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  31. def release(): String

    Returns the operating system release.

    Returns the operating system release.

    Definition Classes
    OS
    Example:
    1. os.release()

  32. def setPriority(priority: Int): Unit
    Definition Classes
    OS
  33. def setPriority(pid: Int, priority: Int): Unit
    Definition Classes
    OS
  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. 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
    Example:
    1. os.tmpdir()

  36. def toLocaleString(): String
    Definition Classes
    Object
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. def totalmem(): Double

    Returns the total amount of system memory in bytes.

    Returns the total amount of system memory in bytes.

    Definition Classes
    OS
    Example:
    1. os.totalmem()

  39. 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
    Example:
    1. os.type()

  40. def uptime(): Int

    Returns the system uptime in seconds.

    Returns the system uptime in seconds.

    Definition Classes
    OS
    Example:
    1. os.uptime()

  41. def userInfo(): UserInfoObject
    Definition Classes
    OS
  42. 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

    a user information object

    Definition Classes
    OS
  43. def valueOf(): Any
    Definition Classes
    Object
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  45. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  46. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from OS

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped