.path = pyimport "path" # .PathLike: ClassType .OSError = OSError .PathLike = PathLike .DirEntry: ClassType .DirEntry. name: Str path: Str inode: (self: .DirEntry) -> Nat is_dir: (self: .DirEntry, follow_symlinks := Bool) -> Bool is_file: (self: .DirEntry, follow_symlinks := Bool) -> Bool is_symlink: (self: .DirEntry) -> Bool is_junction: (self: .DirEntry) -> Bool stat: (self: .DirEntry, follow_symlinks := Bool) -> .StatResult .StatResult = 'stat_result': ClassType .StatResult. st_mode: Nat st_ino: Nat st_dev: Nat st_nlink: Nat st_uid: Nat st_gid: Nat st_size: Nat st_atime: Float st_mtime: Float st_ctime: Float st_atime_ns: Nat st_mtime_ns: Nat st_ctime_ns: Nat st_birthtime: Float st_birthtime_ns: Nat st_blocks: Nat st_blksize: Nat st_rdev: Nat st_flags: Nat st_gen: Nat st_fstype: Nat st_rsize: Nat st_creator: Nat st_type: Nat st_file_attributes: Nat st_reparse_tag: Nat .curdir: Str # TODO: _Environ .environ: {Str: Str} .environb: {Bytes: Bytes} ''' The name of the operating system dependent module imported. The following names have currently been registered: 'posix', 'nt', 'java'. ''' .name: Str .supports_bytes_environ: Bool .supports_dir_fd: Set Subroutine, _ .supports_effective_ids: Set Subroutine, _ .supports_fd: Set Subroutine, _ .supports_follow_symlinks: Set Subroutine, _ .EFD_CLOEXEC: Nat .EFD_NONBLOCK: Nat .EFD_SEMAPHORE: Nat .EX_OK: Nat .EX_USAGE: Nat .EX_DATAERR: Nat .EX_NOINPUT: Nat .EX_NOUSER: Nat .EX_NOHOST: Nat .EX_UNAVAILABLE: Nat .EX_SOFTWARE: Nat .EX_OSERR: Nat .EX_OSFILE: Nat .EX_CANTCREAT: Nat .EX_IOERR: Nat .EX_TEMPFAIL: Nat .EX_PROTOCOL: Nat .EX_NOPERM: Nat .EX_CONFIG: Nat .EX_NOTFOUND: Nat .F_LOCK: Nat .F_TLOCK: Nat .F_ULOCK: Nat .F_TEST: Nat .MFD_CLOEXEC: Nat .MFD_ALLOW_SEALING: Nat .MFD_HUGETLB: Nat .MFD_HUGE_SHIFT: Nat .MFD_HUGE_MASK: Nat .MFD_HUGE_64KB: Nat .MFD_HUGE_512KB: Nat .MFD_HUGE_1MB: Nat .MFD_HUGE_2MB: Nat .MFD_HUGE_8MB: Nat .MFD_HUGE_16MB: Nat .MFD_HUGE_32MB: Nat .MFD_HUGE_256MB: Nat .MFD_HUGE_512MB: Nat .MFD_HUGE_1GB: Nat .MFD_HUGE_2GB: Nat .MFD_HUGE_16GB: Nat .O_RDONLY: Nat .O_WRONLY: Nat .O_RDWR: Nat .O_APPEND: Nat .O_CREAT: Nat .O_EXCL: Nat .O_TRUNC: Nat .O_DSYNC: Nat .O_RSYNC: Nat .O_SYNC: Nat .O_NDELAY: Nat .O_NONBLOCK: Nat .O_NOCTTY: Nat .O_CLOEXEC: Nat .O_BINARY: Nat .O_NOINHERIT: Nat .O_SHORT_LIVED: Nat .O_TEMPORARY: Nat .O_RANDOM: Nat .O_SEQUENTIAL: Nat .O_TEXT: Nat .O_EVTONLY: Nat .O_FSYNC: Nat .O_SYMLINK: Nat .O_NOFOLLOW_ANY: Nat .O_ASYNC: Nat .O_DIRECT: Nat .O_DIRECTORY: Nat .O_NOFOLLOW: Nat .O_NOATIME: Nat .O_PATH: Nat .O_TMPFILE: Nat .O_SHLOCK: Nat .O_EXLOCK: Nat .POSIX_FADV_NORMAL: Nat .POSIX_FADV_SEQUENTIAL: Nat .POSIX_FADV_RANDOM: Nat .POSIX_FADV_NOREUSE: Nat .POSIX_FADV_WILLNEED: Nat .POSIX_FADV_DONTNEED: Nat .PRIO_PGRP: Nat .PRIO_PROCESS: Nat .PRIO_USER: Nat .PRIO_DARWIN_THREAD: Nat .PRIO_DARWIN_PROCESS: Nat .PRIO_DARWIN_BG: Nat .PRIO_DARWIN_NONUI: Nat .RWF_APPEND: Nat .RWF_DSYNC: Nat .RWF_HIPRI: Nat .RWF_NOWAIT: Nat .RWF_SYNC: Nat .SEEK_SET: Nat .SEEK_CUR: Nat .SEEK_END: Nat .SEEK_HOLE: Nat .SEEK_DATA: Nat .SF_MNOWAIT: Nat .SF_NOCACHE: Nat .SF_NODISKIO: Nat .SF_SYNC: Nat .XATTR_CREATE: Nat .XATTR_REPLACE: Nat .XATTR_SIZE_MAX: Nat ._exit!: (n: Nat) => NoneType .abort!: () => NoneType .access!: ( path: PathLike, mode: Nat, dir_fd := Nat or FileDescriptor, effective_ids := Bool, follow_symlinks := Bool, ) => Bool .add_dll_directory!: (path: PathLike) => NoneType .close!: (fd: Nat or FileDescriptor) => NoneType .closerange!: (fd_low: Nat, fd_high: Nat) => NoneType .ctermid!: () => Str .chdir!: (path: PathLike, ) => NoneType .chflags!: (path: PathLike, flags: Nat, follow_symlinks := Bool) => NoneType .chmod!: (path: PathLike, mode: Nat) => NoneType .chown!: ( path: PathLike, uid: Nat, gid: Nat, dir_fd := Nat or FileDescriptor, follow_symlinks := Bool, ) => NoneType .chroot!: (path: PathLike) => NoneType .copy_file_range!: (src: Nat or FileDescriptor, dst: Nat or FileDescriptor, count: Nat, offset_src := Nat, offset_dst := Nat) => Nat .device_encoding: (fd: Nat or FileDescriptor) -> Str or NoneType .dup!: (fd: Nat or FileDescriptor) => Nat .dup2!: (fd: Nat or FileDescriptor, fd2: Nat, inheritable := Bool) => Nat .eventfd!: (initval: Nat, flags := Nat) => Nat .eventfd_read!: (fd: Nat or FileDescriptor) => Nat .eventfd_write!: (fd: Nat or FileDescriptor, value: Nat) => NoneType .execl!: (path: PathLike, *args: Obj) => NoneType .execle!: (path: PathLike, *args: Obj, env := {Str: Str}) => NoneType .execlp!: (file: Str, *args: Obj) => NoneType .execlpe!: (file: Str, *args: Obj, env := {Str: Str}) => NoneType .execv!: (path: PathLike, args: Sequence(Str)) => NoneType .execve!: (path: PathLike, args: Sequence(Str), env: {Str: Str}) => NoneType .execvp!: (file: Str, args: Sequence(Str)) => NoneType .execvpe!: (file: Str, args: Sequence(Str), env: {Str: Str}) => NoneType .fchdir!: (fd: Nat or FileDescriptor) => NoneType .fchmod!: (fd: Nat or FileDescriptor, mode: Nat) => NoneType .fchown!: (fd: Nat or FileDescriptor, uid: Nat, gid: Nat) => NoneType .fdatasync!: (fd: Nat or FileDescriptor) => NoneType .fdopen!: (fd: Nat or FileDescriptor, *args: Obj, **kwargs: Obj) => File! .fork!: () => Nat .forkpty!: () => (Nat, Nat) .fpathconf!: (fd: Nat or FileDescriptor, name: Nat) => Nat .fsdecode: (filename: Bytes) -> Str .fsencode: (filename: Str) -> Bytes .fspath: (path: PathLike) -> Str .fstat!: (fd: Nat or FileDescriptor) => .StatResult .fstatvfs!: (fd: Nat or FileDescriptor) => .StatResult .fsync!: (fd: Nat or FileDescriptor) => NoneType .ftruncate!: (fd: Nat or FileDescriptor, length: Nat) => NoneType .fwalk!: ( top := PathLike, topdown := Bool, onerror := Subroutine, follow_symlinks := Bool, dir_fd := Nat or FileDescriptor, ) => Iterator [Str, [Str; _], [Str; _], Nat] .get_blocking!: (fd: Nat or FileDescriptor) => Bool .get_exec_path!: (env := {Str: Str}) => [Str; _] .get_inheritable!: (fd: Nat or FileDescriptor) => Bool .get_handle_inheritable!: (handle: Nat) => Bool .get_terminal_size!: (fd := Nat or FileDescriptor) => NamedTuple { .columns = Nat; .lines = Nat; } .getcwd!: () => Str .getcwdb!: () => Bytes .getegid!: () => Nat .getenv!: |D <: Str or NoneType|(key: Str, default: D := NoneType) => Str or D .getenvb!: |D <: Bytes or NoneType|(key: Bytes, default: D := NoneType) => Bytes or D .geteuid!: () => Nat .getgid!: () => Nat .getgrouplist!: (user: Str, group: Nat) => [Nat; _] .getgroups!: () => [Nat; _] .getlogin!: () => Str .getpgid!: (pid: Nat) => Nat .getpgrp!: () => Nat .getpid!: () => Nat .getppid!: () => Nat .getpriority!: (which: Nat, who: Nat) => Nat .getrandom!: (size: Nat) => Bytes .getresgid!: () => (Nat, Nat, Nat) .getresuid!: () => (Nat, Nat, Nat) .getsid!: (pid: Nat) => Nat .getuid!: () => Nat .getxattr!: (path: PathLike, attribute: Str, follow_symlinks := Bool) => Bytes .initgroups!: (username: Str, gid: Nat) => NoneType .isatty!: (fd: Nat or FileDescriptor) => Bool .kill!: (pid: Nat, sig: Nat) => NoneType .killpg!: (pgrp: Nat, sig: Nat) => NoneType .lchmod!: (path: PathLike, mode: Nat) => NoneType .lchown!: (path: PathLike, uid: Nat, gid: Nat) => NoneType .link!: ( src: PathLike, dst: PathLike, src_dir_fd := Nat or FileDescriptor, dst_dir_fd := Nat or FileDescriptor, follow_symlinks := Bool, ) => NoneType .listdir!: (path := PathLike,) => [Str; _] .listdrives!: () => [Str; _] .listmounts!: (volume: PathLike) => [Str; _] .listvolumes!: () => [Str; _] .listxattr!: (path: PathLike, follow_symlinks := Bool) => [Str; _] .lockf!: (fd: Nat or FileDescriptor, cmd: Nat, len := Nat) => NoneType .login_tty!: (fd: Nat or FileDescriptor) => NoneType .lseek!: (fd: Nat or FileDescriptor, pos: Nat, whence: Nat) => Nat .lstat!: (path: PathLike, dir_fd := Nat or FileDescriptor) => .StatResult .mkdir!: (path: PathLike, mode := Nat, dir_fd := Nat or FileDescriptor) => NoneType .makedev!: (major: Nat, minor: Nat) => Nat .makedirs!: (path: PathLike, mode := Nat, exist_ok := Bool) => NoneType .makefifo!: (path: PathLike, mode := Nat, dir_fd := Nat or FileDescriptor) => NoneType .major!: (device: Nat) => Nat .memfd_create!: (name: Str, flags: Nat) => Nat .minor!: (device: Nat) => Nat .mknod!: (path: PathLike, mode: Nat, device := Nat, dir_fd := Nat or FileDescriptor) => NoneType .nice!: (increment: Nat) => NoneType .open!: (path: PathLike, flags: Nat, mode := Nat, dir_fd := Nat or FileDescriptor) => Nat .openpty!: () => (Nat, Nat) .pathconf!: (path: PathLike, name: Str or Nat) => Nat .pidfd_open!: (pid: Nat, flags := Nat) => Nat .pipe!: () => (Nat, Nat) .pipe2!: (flags: Nat) => (Nat, Nat) .plock!: (op: Nat) => NoneType .popen!: (cmd: Str, mode := Str, buffering := Nat or {-1}) => File! # TODO: only on linux .posix_fallocate!: (fd: Nat or FileDescriptor, offset: Nat, len: Nat) => NoneType .posix_fadvise!: (fd: Nat or FileDescriptor, offset: Nat, len: Nat, advice: Nat) => NoneType .posix_spawn!: ( path: PathLike, argv: Sequence(Str), env := {Str: Str}, ) => Nat .posix_spawnp!: ( path: PathLike, argv: Sequence(Str), env := {Str: Str}, ) => Nat .pread!: (fd: Nat or FileDescriptor, n: Nat, offset: Nat) => Bytes .preadv!: (fd: Nat or FileDescriptor, buffers: RefMut(ByteArray!), offset: Nat, flags := Nat) => Nat .putenv!: (key: Str, value: Str) => NoneType .pwrite!: (fd: Nat or FileDescriptor, str: Bytes, offset: Nat) => Nat .pwritev!: (fd: Nat or FileDescriptor, buffers: Ref(ByteArray!), offset: Nat, flags := Nat) => Nat .read!: (fd: Nat or FileDescriptor, n: Nat) => Bytes .readlink!: (path: PathLike, dir_fd := Nat or FileDescriptor) => Str .readv!: (fd: Nat or FileDescriptor, buffers: RefMut(ByteArray!)) => Nat .register_at_fork!: (before := Subroutine, after_in_parent := Subroutine, after_in_child := Subroutine) => NoneType .remove!: (path: PathLike,) => NoneType .removedirs!: (path: PathLike,) => NoneType .removexattr!: (path: PathLike, attribute: Str, follow_symlinks := Bool) => NoneType .rename!: (src: PathLike, dst: PathLike) => NoneType .renames!: (old: PathLike, new: PathLike) => NoneType .replace!: (src: PathLike, dst: PathLike) => NoneType .rmdir!: (path: PathLike,) => NoneType .scandir!: (path := PathLike,) => Iterator DirEntry .sendfile!: (out_fd: Nat or FileDescriptor, in_fd: Nat or FileDescriptor, offset := Nat, count := Nat) => Nat .set_blocking!: (fd: Nat or FileDescriptor, blocking: Bool) => NoneType .set_inheritable!: (fd: Nat or FileDescriptor, inheritable: Bool) => NoneType .set_handle_inheritable!: (handle: Nat, inheritable: Bool) => NoneType .setegid!: (egid: Nat) => NoneType .seteuid!: (euid: Nat) => NoneType .setgid!: (gid: Nat) => NoneType .setgroups!: (groups: Sequence(Nat)) => NoneType .setns!: (fd: Nat or FileDescriptor, nstype := Nat) => NoneType .setpgrp!: () => NoneType .setpgid!: (pid: Nat, pgid: Nat) => NoneType .setpriority!: (which: Nat, who: Nat, priority: Nat) => NoneType .setregid!: (rgid: Nat, egid: Nat) => NoneType .setresgid!: (rgid: Nat, egid: Nat, sgid: Nat) => NoneType .setresuid!: (ruid: Nat, euid: Nat, suid: Nat) => NoneType .setreuid!: (ruid: Nat, euid: Nat) => NoneType .setsid!: () => Nat .setuid!: (uid: Nat) => NoneType .setxattr!: (path: PathLike, attribute: PathLike or Bytes, value: PathLike or Bytes, flags := Nat, follow_symlinks := Bool) => NoneType .spawnl!: (mode: Str, path: PathLike, *args: Obj) => NoneType .spawnle!: (mode: Str, path: PathLike, *args: Obj, env := {Str: Str}) => NoneType .spawnlp!: (mode: Str, file: Str, *args: Obj) => NoneType .spawnlpe!: (mode: Str, file: Str, *args: Obj, env := {Str: Str}) => NoneType .spawnv!: (mode: Str, path: PathLike, args: Sequence(Str)) => NoneType .spawnve!: (mode: Str, path: PathLike, args: Sequence(Str), env: {Str: Str}) => NoneType .spawnvp!: (mode: Str, file: Str, args: Sequence(Str)) => NoneType .spawnvpe!: (mode: Str, file: Str, args: Sequence(Str), env: {Str: Str}) => NoneType .splice!: (src: Nat or FileDescriptor, dst: Nat or FileDescriptor, count: Nat, offset_src := Nat, offset_dst := Nat) => NoneType .startfile!: ((path: PathLike) => NoneType) \ and ((path: Str, operation: Str, arguments: Str, cwd: PathLike, show_cmd: Int) => NoneType) .statvfs!: (path: PathLike) => NamedTuple { .f_bsize = Nat; .f_frsize = Nat; .f_blocks = Nat; .f_bfree = Nat; .f_bavail = Nat; .f_files = Nat; .f_ffree = Nat; .f_favail = Nat; .f_flag = Nat; .f_namemax = Nat; .f_fsid = Nat; } .strerror: (code: Nat) -> Str .symlink!: (src: PathLike, dst: PathLike, target_is_directory := Bool, dir_fd := Nat or FileDescriptor) => NoneType .sync!: () => NoneType .system!: (command: Str) => Nat .tcgetpgrp!: (fd: Nat or FileDescriptor) => Nat .tcsetpgrp!: (fd: Nat or FileDescriptor, pgrp: Nat) => NoneType .times!: () => NamedTuple { .user = Float; .system = Float; .children_user = Float; .children_system = Float; } .ttyname!: (fd: Nat or FileDescriptor) => Str .umask!: (mask: Nat) => Nat # posix = pyimport "posix" # .uname!: () => posix.UnameResult .uname!: () => NamedTuple { sysname = Str; nodename = Str; release = Str; version = Str; machine = Str; } .unlink!: (path: PathLike, dir_fd := Nat or FileDescriptor) => NoneType .unsetenv!: (key: Str) => NoneType .unshare!: (flags: Nat) => NoneType .urandom!: (size: Nat) => Bytes .utime!: (path: PathLike, times := (Float, Float)) => NoneType .wait!: () => NamedTuple { .pid = Nat; .status = Nat; } .waitid!: (idtype: Nat, id: Nat, options: Nat) => NamedTuple { .si_pid = Nat; .si_uid = Nat; .si_signo = Nat; .si_status = Nat; .si_code = Nat; } .walk!: ( top: PathLike, topdown := Bool, onerror := Subroutine, followlinks := Bool ) => Iterator((Str, [Str; _], [Str; _]),) .write!: (fd: Nat or FileDescriptor, str: Bytes) => Nat .writev!: (fd: Nat or FileDescriptor, buffers: Ref(ByteArray!)) => Nat