src/nodejs/jsos

    Dark Mode
Search:
Group by:

Example:

import src/nodejs/jsos
requireOs()
echo arch()
echo endianness()
echo freemem()
echo getPriority(pid = 0.cint)
echo homedir()
echo $loadavg()
echo platform()
echo release()
echo tmpdir()
echo totalmem()
echo ostype()
echo uptimeOs()
echo version()

Lets

E2BIG: cint
EACCES: cint
EADDRINUSE: cint
EAFNOSUPPORT: cint
EAGAIN: cint
EALREADY: cint
EBADF: cint
EBADMSG: cint
EBUSY: cint
ECANCELED: cint
ECHILD: cint
ECONNABORTED: cint
ECONNREFUSED: cint
ECONNRESET: cint
EDEADLK: cint
EDESTADDRREQ: cint
EDOM: cint
EDQUOT: cint
EEXIST: cint
EFAULT: cint
EFBIG: cint
EHOSTUNREACH: cint
EIDRM: cint
EILSEQ: cint
EINPROGRESS: cint
EINTR: cint
EINVAL: cint
EIO: cint
EISCONN: cint
EISDIR: cint
ELOOP: cint
EMFILE: cint
EMSGSIZE: cint
EMULTIHOP: cint
ENAMETOOLONG: cint
ENETDOWN: cint
ENETRESET: cint
ENETUNREACH: cint
ENFILE: cint
ENOBUFS: cint
ENODATA: cint
ENODEV: cint
ENOENT: cint
ENOEXEC: cint
ENOLCK: cint
ENOMEM: cint
ENOMSG: cint
ENOPROTOOPT: cint
ENOSPC: cint
ENOSR: cint
ENOSTR: cint
ENOSYS: cint
ENOTCONN: cint
ENOTDIR: cint
ENOTEMPTY: cint
ENOTSOCK: cint
ENOTSUP: cint
ENOTTY: cint
ENXIO: cint
EOL: cstring
EOPNOTSUPP: cint
EOVERFLOW: cint
EPERM: cint
EPIPE: cint
EPROTO: cint
EPROTOTYPE: cint
ERANGE: cint
EROFS: cint
ESPIPE: cint
ESRCH: cint
ESTALE: cint
ETIME: cint
ETIMEDOUT: cint
ETXTBSY: cint
EWOULDBLOCK: cint
EXDEV: cint
PRIORITY_LOW: cint
RTLD_GLOBAL: cint
RTLD_LAZY: cint
RTLD_LOCAL: cint
RTLD_NOW: cint
SIGABRT: cint
SIGALRM: cint
SIGBUS: cint
SIGCHLD: cint
SIGCONT: cint
SIGFPE: cint
SIGHUP: cint
SIGILL: cint
SIGINT: cint
SIGIO: cint
SIGIOT: cint
SIGKILL: cint
SIGPIPE: cint
SIGPOLL: cint
SIGPROF: cint
SIGPWR: cint
SIGQUIT: cint
SIGSEGV: cint
SIGSTKFLT: cint
SIGSTOP: cint
SIGSYS: cint
SIGTERM: cint
SIGTRAP: cint
SIGTSTP: cint
SIGTTIN: cint
SIGTTOU: cint
SIGURG: cint
SIGUSR1: cint
SIGUSR2: cint
SIGVTALRM: cint
SIGWINCH: cint
SIGXCPU: cint
SIGXFSZ: cint

Procs

func arch(): cstring {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_arch
func endianness(): cstring {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_endianness
func freemem(): cint {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_freemem
func getPriority(pid = 0.cint): cint {.importjs: "os.$1(#)", ...raises: [],
                                       tags: [].}
https://nodejs.org/api/os.html#os_os_getpriority_pid
func homedir(): cstring {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_homedir
func importOs() {.importjs: "import * as os from \'os\'@", ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module
func loadavg(): seq[cint] {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_loadavg
func ostype(): cstring {.importjs: "os.type()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_type
func platform(): cstring {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_platform
func release(): cstring {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_release
func requireOs() {.importjs: "const os = require(\'os\')@", ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module
func setPriority(pid, priority: cint) {.importjs: "os.$1(#, #)", ...raises: [],
                                        tags: [].}
https://nodejs.org/api/os.html#os_os_setpriority_pid_priority
func setPriority(priority: cint) {.importjs: "os.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_setpriority_pid_priority
func tmpdir(): cstring {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_tmpdir
func totalmem(): cint {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_totalmem
func uptimeOs(): cint {.importjs: "os.uptime()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_uptime
func userInfo(): cstring {.importjs: "JSON.stringify(os.$1())", ...raises: [],
                           tags: [].}
https://nodejs.org/api/os.html#os_os_userinfo_options
func version(): cstring {.importjs: "os.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/os.html#os_os_version