OILS / pyext / posix_.pyi View on Github | oilshell.org

210 lines, 199 significant
1# Copied from
2# /home/andy/.local/lib/python3.5/site-packages/mypy/typeshed/stdlib/2/posix.pyi
3
4from mycpp import mylib
5from typing import Dict, List, Mapping, Tuple, Union, Sequence, IO, Optional, TypeVar
6
7error = OSError
8
9confstr_names = ... # type: Dict[str, int]
10environ = ... # type: Dict[str, str]
11pathconf_names = ... # type: Dict[str, int]
12sysconf_names = ... # type: Dict[str, int]
13
14EX_CANTCREAT = ... # type: int
15EX_CONFIG = ... # type: int
16EX_DATAERR = ... # type: int
17EX_IOERR = ... # type: int
18EX_NOHOST = ... # type: int
19EX_NOINPUT = ... # type: int
20EX_NOPERM = ... # type: int
21EX_NOUSER = ... # type: int
22EX_OK = ... # type: int
23EX_OSERR = ... # type: int
24EX_OSFILE = ... # type: int
25EX_PROTOCOL = ... # type: int
26EX_SOFTWARE = ... # type: int
27EX_TEMPFAIL = ... # type: int
28EX_UNAVAILABLE = ... # type: int
29EX_USAGE = ... # type: int
30F_OK = ... # type: int
31NGROUPS_MAX = ... # type: int
32O_APPEND = ... # type: int
33O_ASYNC = ... # type: int
34O_CREAT = ... # type: int
35O_DIRECT = ... # type: int
36O_DIRECTORY = ... # type: int
37O_DSYNC = ... # type: int
38O_EXCL = ... # type: int
39O_LARGEFILE = ... # type: int
40O_NDELAY = ... # type: int
41O_NOATIME = ... # type: int
42O_NOCTTY = ... # type: int
43O_NOFOLLOW = ... # type: int
44O_NONBLOCK = ... # type: int
45O_RDONLY = ... # type: int
46O_RDWR = ... # type: int
47O_RSYNC = ... # type: int
48O_SYNC = ... # type: int
49O_TRUNC = ... # type: int
50O_WRONLY = ... # type: int
51R_OK = ... # type: int
52TMP_MAX = ... # type: int
53WCONTINUED = ... # type: int
54WNOHANG = ... # type: int
55WUNTRACED = ... # type: int
56W_OK = ... # type: int
57X_OK = ... # type: int
58
59def WCOREDUMP(status: int) -> int: ...
60def WEXITSTATUS(status: int) -> int: ...
61def WIFCONTINUED(status: int) -> bool: ...
62def WIFEXITED(status: int) -> bool: ...
63def WIFSIGNALED(status: int) -> bool: ...
64def WIFSTOPPED(status: int) -> bool: ...
65def WSTOPSIG(status: int) -> int: ...
66def WTERMSIG(status: int) -> int: ...
67
68class stat_result(object):
69 n_fields = ... # type: int
70 n_sequence_fields = ... # type: int
71 n_unnamed_fields = ... # type: int
72 st_mode = ... # type: int
73 st_ino = ... # type: int
74 st_dev = ... # type: int
75 st_nlink = ... # type: int
76 st_uid = ... # type: int
77 st_gid = ... # type: int
78 st_size = ... # type: int
79 st_atime = ... # type: int
80 st_mtime = ... # type: int
81 st_ctime = ... # type: int
82
83class statvfs_result(object):
84 n_fields = ... # type: int
85 n_sequence_fields = ... # type: int
86 n_unnamed_fields = ... # type: int
87 f_bsize = ... # type: int
88 f_frsize = ... # type: int
89 f_blocks = ... # type: int
90 f_bfree = ... # type: int
91 f_bavail = ... # type: int
92 f_files = ... # type: int
93 f_ffree = ... # type: int
94 f_favail = ... # type: int
95 f_flag = ... # type: int
96 f_namemax = ... # type: int
97
98def _exit(status: int) -> None: ...
99def abort() -> None: ...
100def access(path: unicode, mode: int) -> bool: ...
101def chdir(path: unicode) -> None: ...
102def chmod(path: unicode, mode: int) -> None: ...
103def chown(path: unicode, uid: int, gid: int) -> None: ...
104def chroot(path: unicode) -> None: ...
105def close(fd: int) -> None: ...
106def closerange(fd_low: int, fd_high: int) -> None: ...
107def confstr(name: Union[str, int]) -> str: ...
108def ctermid() -> str: ...
109def dup(fd: int) -> int: ...
110def dup2(fd: int, fd2: int) -> None: ...
111def execv(path: str, args: Sequence[str], env: Mapping[str, str]) -> None: ...
112def execve(path: str, args: Sequence[str], env: Mapping[str, str]) -> None: ...
113def fchdir(fd: int) -> None: ...
114def fchmod(fd: int, mode: int) -> None: ...
115def fchown(fd: int, uid: int, gid: int) -> None: ...
116def fdatasync(fd: int) -> None: ...
117
118def fdopen(fd: int, mode: str = ..., bufsize: int = ...) -> IO[str]: ...
119def fork() -> int:
120 raise OSError()
121def forkpty() -> Tuple[int, int]:
122 raise OSError()
123def fpathconf(fd: int, name: str) -> None: ...
124def fstat(fd: int) -> stat_result: ...
125def fstatvfs(fd: int) -> statvfs_result: ...
126def fsync(fd: int) -> None: ...
127def ftruncate(fd: int, length: int) -> None: ...
128def getcwd() -> str: ...
129def getcwdu() -> unicode: ...
130def getegid() -> int: ...
131def geteuid() -> int: ...
132def getgid() -> int: ...
133def getgroups() -> List[int]: ...
134def getloadavg() -> Tuple[float, float, float]:
135 raise OSError()
136def getlogin() -> str: ...
137def getpgid(pid: int) -> int: ...
138def getpgrp() -> int: ...
139def getpid() -> int: ...
140def getppid() -> int: ...
141def getresgid() -> Tuple[int, int, int]: ...
142def getresuid() -> Tuple[int, int, int]: ...
143def getsid(pid: int) -> int: ...
144def getuid() -> int: ...
145def initgroups(username: str, gid: int) -> None: ...
146def isatty(fd: int) -> bool: ...
147def kill(pid: int, sig: int) -> None: ...
148def killpg(pgid: int, sig: int) -> None: ...
149def lchown(path: unicode, uid: int, gid: int) -> None: ...
150def link(source: unicode, link_name: str) -> None: ...
151_T = TypeVar("_T")
152def listdir(path: _T) -> List[_T]: ...
153def lseek(fd: int, pos: int, how: int) -> None: ...
154def lstat(path: unicode) -> stat_result: ...
155def major(device: int) -> int: ...
156def makedev(major: int, minor: int) -> int: ...
157def minor(device: int) -> int: ...
158def mkdir(path: unicode, mode: int = ...) -> None: ...
159def mkfifo(path: unicode, mode: int = ...) -> None: ...
160def mknod(filename: unicode, mode: int = ..., device: int = ...) -> None: ...
161def nice(increment: int) -> int: ...
162def open(file: unicode, flags: int, mode: int = ...) -> int: ...
163def openpty() -> Tuple[int, int]: ...
164def pathconf(path: unicode, name: str) -> str: ...
165def pipe() -> Tuple[int, int]: ...
166def popen(command: str, mode: str = ..., bufsize: int = ...) -> IO[str]: ...
167def putenv(varname: str, value: str) -> None: ...
168def read(fd: int, n: int) -> str: ...
169def readlink(path: _T) -> _T: ...
170def remove(path: unicode) -> None: ...
171def rename(src: unicode, dst: unicode) -> None: ...
172def rmdir(path: unicode) -> None: ...
173def setegid(egid: int) -> None: ...
174def seteuid(euid: int) -> None: ...
175def setgid(gid: int) -> None: ...
176def setgroups(groups: Sequence[int]) -> None: ...
177def setpgid(pid: int, pgrp: int) -> None: ...
178def setpgrp() -> None: ...
179def setregid(rgid: int, egid: int) -> None: ...
180def setresgid(rgid: int, egid: int, sgid: int) -> None: ...
181def setresuid(ruid: int, euid: int, suid: int) -> None: ...
182def setreuid(ruid: int, euid: int) -> None: ...
183def setsid() -> None: ...
184def setuid(pid: int) -> None: ...
185def stat(path: unicode) -> stat_result: ...
186def statvfs(path: unicode) -> statvfs_result: ...
187def stat_float_times(fd: int) -> None: ...
188def strerror(code: int) -> str: ...
189def symlink(source: unicode, link_name: unicode) -> None: ...
190def sysconf(name: Union[str, int]) -> int: ...
191def system(command: unicode) -> int: ...
192def tcgetpgrp(fd: int) -> int: ...
193def tcsetpgrp(fd: int, pg: int) -> None: ...
194def times() -> Tuple[float, float, float, float, float]: ...
195def tmpfile() -> IO[str]: ...
196def ttyname(fd: int) -> str: ...
197def umask(mask: int) -> int: ...
198def uname() -> Tuple[str, str, str, str, str]: ...
199def unlink(path: unicode) -> None: ...
200def unsetenv(varname: str) -> None: ...
201def urandom(n: int) -> str: ...
202def utime(path: unicode, times: Optional[Tuple[int, int]]) -> None:
203 raise OSError
204def wait() -> int: ...
205_r = Tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int]
206def wait3(options: int) -> Tuple[int, int, _r]: ...
207def wait4(pid: int, options: int) -> Tuple[int, int, _r]: ...
208def waitpid(pid: int, options: int) -> Tuple[int, int]:
209 raise OSError()
210def write(fd: int, str: str) -> int: ...