src/cpython/os

    Dark Mode
Search:
Group by:

Lets

name: string = to(getAttr(pyImport("os"), "name"), string)
curdir: string = to(getAttr(pyImport("os"), "curdir"), string)
pardir: string = to(getAttr(pyImport("os"), "pardir"), string)
sep: string = to(getAttr(pyImport("os"), "sep"), string)
altsep: string = to(getAttr(pyImport("os"), "altsep"), string)
extsep: string = to(getAttr(pyImport("os"), "extsep"), string)
pathsep: string = to(getAttr(pyImport("os"), "pathsep"), string)
defpath: string = to(getAttr(pyImport("os"), "defpath"), string)
linesep: string = to(getAttr(pyImport("os"), "linesep"), string)
devnull: string = to(getAttr(pyImport("os"), "devnull"), string)
PRIO_PROCESS: int = to(getAttr(pyImport("os"), "PRIO_PROCESS"), int)
PRIO_PGRP: int = to(getAttr(pyImport("os"), "PRIO_PGRP"), int)
PRIO_USER: int = to(getAttr(pyImport("os"), "PRIO_USER"), int)
F_LOCK: int = to(getAttr(pyImport("os"), "F_LOCK"), int)
F_TLOCK: int = to(getAttr(pyImport("os"), "F_TLOCK"), int)
F_ULOCK: int = to(getAttr(pyImport("os"), "F_ULOCK"), int)
F_TEST: int = to(getAttr(pyImport("os"), "F_TEST"), int)
SEEK_SET: int = to(getAttr(pyImport("os"), "SEEK_SET"), int)
SEEK_CUR: int = to(getAttr(pyImport("os"), "SEEK_CUR"), int)
SEEK_END: int = to(getAttr(pyImport("os"), "SEEK_END"), int)
O_RDONLY: int = to(getAttr(pyImport("os"), "O_RDONLY"), int)
O_WRONLY: int = to(getAttr(pyImport("os"), "O_WRONLY"), int)
O_RDWR: int = to(getAttr(pyImport("os"), "O_RDWR"), int)
O_APPEND: int = to(getAttr(pyImport("os"), "O_APPEND"), int)
O_CREAT: int = to(getAttr(pyImport("os"), "O_CREAT"), int)
O_EXCL: int = to(getAttr(pyImport("os"), "O_EXCL"), int)
O_TRUNC: int = to(getAttr(pyImport("os"), "O_TRUNC"), int)
O_DSYNC: int = to(getAttr(pyImport("os"), "O_DSYNC"), int)
O_RSYNC: int = to(getAttr(pyImport("os"), "O_RSYNC"), int)
O_SYNC: int = to(getAttr(pyImport("os"), "O_SYNC"), int)
O_NDELAY: int = to(getAttr(pyImport("os"), "O_NDELAY"), int)
O_NONBLOCK: int = to(getAttr(pyImport("os"), "O_NONBLOCK"), int)
O_NOCTTY: int = to(getAttr(pyImport("os"), "O_NOCTTY"), int)
O_CLOEXEC: int = to(getAttr(pyImport("os"), "O_CLOEXEC"), int)
O_BINARY: int = to(getAttr(pyImport("os"), "O_BINARY"), int)
O_NOINHERIT: int = to(getAttr(pyImport("os"), "O_NOINHERIT"), int)
O_SHORT_LIVED: int = to(getAttr(pyImport("os"), "O_SHORT_LIVED"), int)
O_TEMPORARY: int = to(getAttr(pyImport("os"), "O_TEMPORARY"), int)
O_RANDOM: int = to(getAttr(pyImport("os"), "O_RANDOM"), int)
O_SEQUENTIAL: int = to(getAttr(pyImport("os"), "O_SEQUENTIAL"), int)
O_TEXT: int = to(getAttr(pyImport("os"), "O_TEXT"), int)
O_EVTONLY: int = to(getAttr(pyImport("os"), "O_EVTONLY"), int)
O_FSYNC: int = to(getAttr(pyImport("os"), "O_FSYNC"), int)
O_SYMLINK: int = to(getAttr(pyImport("os"), "O_SYMLINK"), int)
O_NOFOLLOW_ANY: int = to(getAttr(pyImport("os"), "O_NOFOLLOW_ANY"), int)
O_ASYNC: int = to(getAttr(pyImport("os"), "O_ASYNC"), int)
O_DIRECT: int = to(getAttr(pyImport("os"), "O_DIRECT"), int)
O_DIRECTORY: int = to(getAttr(pyImport("os"), "O_DIRECTORY"), int)
O_NOFOLLOW: int = to(getAttr(pyImport("os"), "O_NOFOLLOW"), int)
O_NOATIME: int = to(getAttr(pyImport("os"), "O_NOATIME"), int)
O_PATH: int = to(getAttr(pyImport("os"), "O_PATH"), int)
O_TMPFILE: int = to(getAttr(pyImport("os"), "O_TMPFILE"), int)
O_SHLOCK: int = to(getAttr(pyImport("os"), "O_SHLOCK"), int)
O_EXLOCK: int = to(getAttr(pyImport("os"), "O_EXLOCK"), int)
POSIX_FADV_NORMAL: int = to(getAttr(pyImport("os"), "POSIX_FADV_NORMAL"), int)
POSIX_FADV_SEQUENTIAL: int = to(getAttr(pyImport("os"), "POSIX_FADV_SEQUENTIAL"),
                                int)
POSIX_FADV_RANDOM: int = to(getAttr(pyImport("os"), "POSIX_FADV_RANDOM"), int)
POSIX_FADV_NOREUSE: int = to(getAttr(pyImport("os"), "POSIX_FADV_NOREUSE"), int)
POSIX_FADV_WILLNEED: int = to(getAttr(pyImport("os"), "POSIX_FADV_WILLNEED"),
                              int)
POSIX_FADV_DONTNEED: int = to(getAttr(pyImport("os"), "POSIX_FADV_DONTNEED"),
                              int)
RWF_NOWAIT: int = to(getAttr(pyImport("os"), "RWF_NOWAIT"), int)
RWF_HIPRI: int = to(getAttr(pyImport("os"), "RWF_HIPRI"), int)
RWF_DSYNC: int = to(getAttr(pyImport("os"), "RWF_DSYNC"), int)
RWF_SYNC: int = to(getAttr(pyImport("os"), "RWF_SYNC"), int)
RWF_APPEND: int = to(getAttr(pyImport("os"), "RWF_APPEND"), int)
SPLICE_F_MOVE: int = to(getAttr(pyImport("os"), "SPLICE_F_MOVE"), int)
SPLICE_F_NONBLOCK: int = to(getAttr(pyImport("os"), "SPLICE_F_NONBLOCK"), int)
SPLICE_F_MORE: int = to(getAttr(pyImport("os"), "SPLICE_F_MORE"), int)
F_OK: int = to(getAttr(pyImport("os"), "F_OK"), int)
R_OK: int = to(getAttr(pyImport("os"), "R_OK"), int)
W_OK: int = to(getAttr(pyImport("os"), "W_OK"), int)
X_OK: int = to(getAttr(pyImport("os"), "X_OK"), int)
MFD_CLOEXEC: int = to(getAttr(pyImport("os"), "MFD_CLOEXEC"), int)
MFD_ALLOW_SEALING: int = to(getAttr(pyImport("os"), "MFD_ALLOW_SEALING"), int)
MFD_HUGETLB: int = to(getAttr(pyImport("os"), "MFD_HUGETLB"), int)
MFD_HUGE_SHIFT: int = to(getAttr(pyImport("os"), "MFD_HUGE_SHIFT"), int)
MFD_HUGE_MASK: int = to(getAttr(pyImport("os"), "MFD_HUGE_MASK"), int)
MFD_HUGE_64KB: int = to(getAttr(pyImport("os"), "MFD_HUGE_64KB"), int)
MFD_HUGE_512KB: int = to(getAttr(pyImport("os"), "MFD_HUGE_512KB"), int)
MFD_HUGE_1MB: int = to(getAttr(pyImport("os"), "MFD_HUGE_1MB"), int)
MFD_HUGE_2MB: int = to(getAttr(pyImport("os"), "MFD_HUGE_2MB"), int)
MFD_HUGE_8MB: int = to(getAttr(pyImport("os"), "MFD_HUGE_8MB"), int)
MFD_HUGE_16MB: int = to(getAttr(pyImport("os"), "MFD_HUGE_16MB"), int)
MFD_HUGE_32MB: int = to(getAttr(pyImport("os"), "MFD_HUGE_32MB"), int)
MFD_HUGE_256MB: int = to(getAttr(pyImport("os"), "MFD_HUGE_256MB"), int)
MFD_HUGE_512MB: int = to(getAttr(pyImport("os"), "MFD_HUGE_512MB"), int)
MFD_HUGE_1GB: int = to(getAttr(pyImport("os"), "MFD_HUGE_1GB"), int)
MFD_HUGE_2GB: int = to(getAttr(pyImport("os"), "MFD_HUGE_2GB"), int)
MFD_HUGE_16GB: int = to(getAttr(pyImport("os"), "MFD_HUGE_16GB"), int)
EFD_CLOEXEC: int = to(getAttr(pyImport("os"), "EFD_CLOEXEC"), int)
EFD_NONBLOCK: int = to(getAttr(pyImport("os"), "EFD_NONBLOCK"), int)
EFD_SEMAPHORE: int = to(getAttr(pyImport("os"), "EFD_SEMAPHORE"), int)
XATTR_SIZE_MAX: int = to(getAttr(pyImport("os"), "XATTR_SIZE_MAX"), int)
XATTR_CREATE: int = to(getAttr(pyImport("os"), "XATTR_CREATE"), int)
XATTR_REPLACE: int = to(getAttr(pyImport("os"), "XATTR_REPLACE"), int)
EX_OK: int = to(getAttr(pyImport("os"), "EX_OK"), int)
EX_USAGE: int = to(getAttr(pyImport("os"), "EX_USAGE"), int)
EX_DATAERR: int = to(getAttr(pyImport("os"), "EX_DATAERR"), int)
EX_NOINPUT: int = to(getAttr(pyImport("os"), "EX_NOINPUT"), int)
EX_NOUSER: int = to(getAttr(pyImport("os"), "EX_NOUSER"), int)
EX_NOHOST: int = to(getAttr(pyImport("os"), "EX_NOHOST"), int)
EX_UNAVAILABLE: int = to(getAttr(pyImport("os"), "EX_UNAVAILABLE"), int)
EX_SOFTWARE: int = to(getAttr(pyImport("os"), "EX_SOFTWARE"), int)
EX_OSERR: int = to(getAttr(pyImport("os"), "EX_OSERR"), int)
EX_OSFILE: int = to(getAttr(pyImport("os"), "EX_OSFILE"), int)
EX_CANTCREAT: int = to(getAttr(pyImport("os"), "EX_CANTCREAT"), int)
EX_IOERR: int = to(getAttr(pyImport("os"), "EX_IOERR"), int)
EX_TEMPFAIL: int = to(getAttr(pyImport("os"), "EX_TEMPFAIL"), int)
EX_PROTOCOL: int = to(getAttr(pyImport("os"), "EX_PROTOCOL"), int)
EX_NOPERM: int = to(getAttr(pyImport("os"), "EX_NOPERM"), int)
EX_CONFIG: int = to(getAttr(pyImport("os"), "EX_CONFIG"), int)
EX_NOTFOUND: int = to(getAttr(pyImport("os"), "EX_NOTFOUND"), int)
POSIX_SPAWN_OPEN: int = to(getAttr(pyImport("os"), "POSIX_SPAWN_OPEN"), int)
POSIX_SPAWN_CLOSE: int = to(getAttr(pyImport("os"), "POSIX_SPAWN_CLOSE"), int)
POSIX_SPAWN_DUP2: int = to(getAttr(pyImport("os"), "POSIX_SPAWN_DUP2"), int)
P_NOWAIT: int = to(getAttr(pyImport("os"), "P_NOWAIT"), int)
P_NOWAITO: int = to(getAttr(pyImport("os"), "P_NOWAITO"), int)
P_WAIT: int = to(getAttr(pyImport("os"), "P_WAIT"), int)
P_DETACH: int = to(getAttr(pyImport("os"), "P_DETACH"), int)
P_OVERLAY: int = to(getAttr(pyImport("os"), "P_OVERLAY"), int)
P_PID: int = to(getAttr(pyImport("os"), "P_PID"), int)
P_PGID: int = to(getAttr(pyImport("os"), "P_PGID"), int)
P_ALL: int = to(getAttr(pyImport("os"), "P_ALL"), int)
P_PIDFD: int = to(getAttr(pyImport("os"), "P_PIDFD"), int)
WEXITED: int = to(getAttr(pyImport("os"), "WEXITED"), int)
WSTOPPED: int = to(getAttr(pyImport("os"), "WSTOPPED"), int)
WNOWAIT: int = to(getAttr(pyImport("os"), "WNOWAIT"), int)
CLD_EXITED: int = to(getAttr(pyImport("os"), "CLD_EXITED"), int)
CLD_KILLED: int = to(getAttr(pyImport("os"), "CLD_KILLED"), int)
CLD_DUMPED: int = to(getAttr(pyImport("os"), "CLD_DUMPED"), int)
CLD_TRAPPED: int = to(getAttr(pyImport("os"), "CLD_TRAPPED"), int)
CLD_STOPPED: int = to(getAttr(pyImport("os"), "CLD_STOPPED"), int)
CLD_CONTINUED: int = to(getAttr(pyImport("os"), "CLD_CONTINUED"), int)
WNOHANG: int = to(getAttr(pyImport("os"), "WNOHANG"), int)
WCONTINUED: int = to(getAttr(pyImport("os"), "WCONTINUED"), int)
WUNTRACED: int = to(getAttr(pyImport("os"), "WUNTRACED"), int)
SCHED_OTHER: int = to(getAttr(pyImport("os"), "SCHED_OTHER"), int)
SCHED_BATCH: int = to(getAttr(pyImport("os"), "SCHED_BATCH"), int)
SCHED_IDLE: int = to(getAttr(pyImport("os"), "SCHED_IDLE"), int)
SCHED_SPORADIC: int = to(getAttr(pyImport("os"), "SCHED_SPORADIC"), int)
SCHED_FIFO: int = to(getAttr(pyImport("os"), "SCHED_FIFO"), int)
SCHED_RR: int = to(getAttr(pyImport("os"), "SCHED_RR"), int)
SCHED_RESET_ON_FORK: int = to(getAttr(pyImport("os"), "SCHED_RESET_ON_FORK"),
                              int)
RTLD_LAZY: int = to(getAttr(pyImport("os"), "RTLD_LAZY"), int)
RTLD_NOW: int = to(getAttr(pyImport("os"), "RTLD_NOW"), int)
RTLD_GLOBAL: int = to(getAttr(pyImport("os"), "RTLD_GLOBAL"), int)
RTLD_LOCAL: int = to(getAttr(pyImport("os"), "RTLD_LOCAL"), int)
RTLD_NODELETE: int = to(getAttr(pyImport("os"), "RTLD_NODELETE"), int)
RTLD_NOLOAD: int = to(getAttr(pyImport("os"), "RTLD_NOLOAD"), int)
RTLD_DEEPBIND: int = to(getAttr(pyImport("os"), "RTLD_DEEPBIND"), int)
GRND_NONBLOCK: int = to(getAttr(pyImport("os"), "GRND_NONBLOCK"), int)
GRND_RANDOM: int = to(getAttr(pyImport("os"), "GRND_RANDOM"), int)

Procs

proc getcwd(): string {....raises: [Exception, ValueError, OSError, IOError,
                                 EOFError, KeyError], tags: [RootEffect].}
proc getpgid(pid: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                       EOFError, KeyError], tags: [RootEffect].}
proc chdir(path: string) {....raises: [Exception, ValueError, OSError, IOError,
                                    EOFError, KeyError], tags: [RootEffect].}
proc fspath(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc get_exec_path(): seq[string] {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc ctermid(): string {....raises: [Exception, ValueError, OSError, IOError,
                                  EOFError, KeyError], tags: [RootEffect].}
proc getegid(): int {....raises: [Exception, ValueError, OSError, IOError,
                               EOFError, KeyError], tags: [RootEffect].}
proc geteuid(): int {....raises: [Exception, ValueError, OSError, IOError,
                               EOFError, KeyError], tags: [RootEffect].}
proc getgid(): int {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                              KeyError], tags: [RootEffect].}
proc getgroups(): seq[int] {....raises: [Exception, ValueError, OSError, IOError,
                                      EOFError, KeyError], tags: [RootEffect].}
proc getlogin(): string {....raises: [Exception, ValueError, OSError, IOError,
                                   EOFError, KeyError], tags: [RootEffect].}
proc getpgrp(): int {....raises: [Exception, ValueError, OSError, IOError,
                               EOFError, KeyError], tags: [RootEffect].}
proc getpid(): int {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                              KeyError], tags: [RootEffect].}
proc getenv(key: string; default = ""): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc getenvb(key: string; default = ""): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc getgrouplist(user: string; group: int): seq[int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc getppid(): int {....raises: [Exception, ValueError, OSError, IOError,
                               EOFError, KeyError], tags: [RootEffect].}
proc getpriority(which: string; who: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc getresuid(): tuple[ruid: int, euid: int, suid: int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc getresgid(): tuple[rgid: int, egid: int, sgid: int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc getuid(): int {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                              KeyError], tags: [RootEffect].}
proc initgroups(username: string; gid: int): seq[int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc putenv(key, value: string) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc setegid(egid: int) {....raises: [Exception, ValueError, OSError, IOError,
                                   EOFError, KeyError], tags: [RootEffect].}
proc seteuid(euid: int) {....raises: [Exception, ValueError, OSError, IOError,
                                   EOFError, KeyError], tags: [RootEffect].}
proc setgid(gid: int) {....raises: [Exception, ValueError, OSError, IOError,
                                 EOFError, KeyError], tags: [RootEffect].}
proc setgroups(groups: seq[int]) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc setpgrp() {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                          KeyError], tags: [RootEffect].}
proc setpgid(pid, pgrp: int) {....raises: [Exception, ValueError, OSError, IOError,
                                        EOFError, KeyError], tags: [RootEffect].}
proc setpriority(which, who: int; priority: -20 .. 19 = 0) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc setregid(rgid, egid: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc setresgid(rgid, egid, sgid: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc setresuid(ruid, euid, suid: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc setreuid(ruid, euid: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc getsid(pid: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                      EOFError, KeyError], tags: [RootEffect].}
proc setsid() {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                         KeyError], tags: [RootEffect].}
proc setuid(uid: int) {....raises: [Exception, ValueError, OSError, IOError,
                                 EOFError, KeyError], tags: [RootEffect].}
proc strerror(errorCode: int): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc umask(mask: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                      EOFError, KeyError], tags: [RootEffect].}
proc uname(): tuple[sysname, nodename, release, version, machine: string] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc unsetenv(key: string) {....raises: [Exception, ValueError, OSError, IOError,
                                      EOFError, KeyError], tags: [RootEffect].}
proc close(fileDescriptor: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc closerange(fromFileDescriptor, toFileDescriptor: int) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc copy_file_range(src, dst, count: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc device_encoding(fd: int): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc fchmod(fd, mode: int) {....raises: [Exception, ValueError, OSError, IOError,
                                      EOFError, KeyError], tags: [RootEffect].}
proc fchown(fd, uid, gid: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc fdatasync(fd: int) {....raises: [Exception, ValueError, OSError, IOError,
                                   EOFError, KeyError], tags: [RootEffect].}
proc fsync(fd: int) {....raises: [Exception, ValueError, OSError, IOError,
                               EOFError, KeyError], tags: [RootEffect].}
proc ftruncate(fd, len: int) {....raises: [Exception, ValueError, OSError, IOError,
                                        EOFError, KeyError], tags: [RootEffect].}
proc get_blocking(fd: int): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc isatty(fd: int): bool {....raises: [Exception, ValueError, OSError, IOError,
                                      EOFError, KeyError], tags: [RootEffect].}
proc lseek(fd, pos, how: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc openpty(): tuple[master, slave: int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc pipe(): tuple[read, write: int] {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc pipe2(flags: int): tuple[read, write: int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc posix_fallocate(fd, offset, len: int) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc posix_fadvise(fd, offset, len, advice: int) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc pread(fd, n, offset: int): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc pwrite(fd: int; str: string; offset: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc read(fd, n: int): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc sendfile(out_fd, in_fd, offset, count: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc splice(src, dst, count: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc tcgetpgrp(fd: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                        EOFError, KeyError], tags: [RootEffect].}
proc tcsetpgrp(fd, pg: int) {....raises: [Exception, ValueError, OSError, IOError,
                                       EOFError, KeyError], tags: [RootEffect].}
proc ttyname(fd: int): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc write(fd: int; str: string): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc get_terminal_size(fd: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc get_inheritable(fd: int): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc set_inheritable(fd: int; inheritable: bool) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc access(path: string; mode: int): bool {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc access(path: string; mode: int; effective_ids, follow_symlinks: bool): bool {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc chflags(path: string; flags: int) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc chflags(path: string; flags: int; follow_symlinks: bool) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc chmod(path: string; mode: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc chmod(path: string; mode: int; follow_symlinks: bool) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc chown(path: string; uid, gid: int) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc chown(path: string; uid, gid: int; follow_symlinks: bool) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc chroot(path: string) {....raises: [Exception, ValueError, OSError, IOError,
                                     EOFError, KeyError], tags: [RootEffect].}
proc fchdir(fd: int) {....raises: [Exception, ValueError, OSError, IOError,
                                EOFError, KeyError], tags: [RootEffect].}
proc getcwdb(): string {....raises: [Exception, ValueError, OSError, IOError,
                                  EOFError, KeyError], tags: [RootEffect].}
proc lchflags(path: string; flags: int) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc lchmod(path: string; mode: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc lchown(path: string; uid, gid: int) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc link(src, dst: string) {....raises: [Exception, ValueError, OSError, IOError,
                                       EOFError, KeyError], tags: [RootEffect].}
proc link(src, dst: string; follow_symlinks: bool) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc listdir(path = "."): seq[string] {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc mkdir(path: string; mode = 511) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc makedirs(name: string; mode = 511; exist_ok = false) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc mkfifo(path: string; mode = 438) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc mknod(path: string; mode = 384; device = 0) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc major(device: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                        EOFError, KeyError], tags: [RootEffect].}
proc minor(device: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                        EOFError, KeyError], tags: [RootEffect].}
proc makedev(major, minor: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc readlink(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc remove(path: string) {....raises: [Exception, ValueError, OSError, IOError,
                                     EOFError, KeyError], tags: [RootEffect].}
proc removedirs(path: string) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc rename(src, dst: string) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc renames(olds, news: string) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc replace(src, dst: string) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc rmdir(path: string) {....raises: [Exception, ValueError, OSError, IOError,
                                    EOFError, KeyError], tags: [RootEffect].}
proc symlink(src, dst: string; target_is_directory = false) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sync() {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                       KeyError], tags: [RootEffect].}
proc truncate(path: string; len: int) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc unlink(path: string) {....raises: [Exception, ValueError, OSError, IOError,
                                     EOFError, KeyError], tags: [RootEffect].}
proc utime(path: string) {....raises: [Exception, ValueError, OSError, IOError,
                                    EOFError, KeyError], tags: [RootEffect].}
proc memfd_create(path: string): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc eventfd(initval: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc eventfd_write(fd: int; value: string) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc eventfd_read(fd: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc getxattr(path, attribute: string; follow_symlinks = true): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc listxattr(path: string; follow_symlinks = true): seq[string] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc removexattr(path, attribute: string; follow_symlinks = true) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc setxattr(path, attribute, value: string; flags = 0; follow_symlinks = true) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc abort() {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                        KeyError], tags: [RootEffect].}
proc add_dll_directory(path: string) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc fork(): int {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                            KeyError], tags: [RootEffect].}
proc forkpty(): tuple[pid, fd: int] {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc kill(pid, sig: int) {....raises: [Exception, ValueError, OSError, IOError,
                                    EOFError, KeyError], tags: [RootEffect].}
proc killpg(pgid, sig: int) {....raises: [Exception, ValueError, OSError, IOError,
                                       EOFError, KeyError], tags: [RootEffect].}
proc nice(increment: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc pidfd_open(pid: int; flags = 0): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc startfile(path, operation, arguments, cwd: string) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc startfile(path: string) {....raises: [Exception, ValueError, OSError, IOError,
                                        EOFError, KeyError], tags: [RootEffect].}
proc system(command: string): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc times(): tuple[user, system, children_user, children_system, elapsed: float] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc wait(): tuple[pid, exitCode: int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc waitpid(pid, options: int): tuple[pid, exitCode: int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc waitstatus_to_exitcode(status: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc WCOREDUMP(status: int): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc WIFCONTINUED(status: int): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc WIFSTOPPED(status: int): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc WIFSIGNALED(status: int): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc WIFEXITED(status: int): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc WEXITSTATUS(status: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc WSTOPSIG(status: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc WTERMSIG(status: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc sched_get_priority_min(policy: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sched_get_priority_max(policy: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sched_getscheduler(pid: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sched_rr_get_interval(pid: int): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sched_yield() {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                              KeyError], tags: [RootEffect].}
proc sched_setaffinity(pid: int; mask: seq[int]) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc confstr(name: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc cpu_count(): int {....raises: [Exception, ValueError, OSError, IOError,
                                 EOFError, KeyError], tags: [RootEffect].}
proc getloadavg(): array[3, float] {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc sysconf(name: string): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc getrandom(size: int; flags = 0): seq[byte] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc urandom(size: int): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc abspath(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc basename(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc commonpath(paths: seq[string]): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc commonprefix(paths: seq[string]): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc dirname(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc exists(path: string): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc lexists(path: string): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc expanduser(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc expandvars(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc getatime(path: string): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc getmtime(path: string): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc getctime(path: string): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc getsize(path: string): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc isabs(path: string): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc isfile(path: string): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc isdir(path: string): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc islink(path: string): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc ismount(path: string): bool {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc samefile(path1, path2: string): bool {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sameopenfile(path1, path2: int): bool {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc normcase(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc normpath(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc realpath(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc relpath(path: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc split(path: string): tuple[head, tail: string] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc splitdrive(path: string): tuple[drive, tail: string] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc splitext(path: string): tuple[root, ext: string] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}