2 from io import IOBase
\r
3 from typing import Any, IO, Union
\r
5 FASYNC = ... # type: int
\r
6 FD_CLOEXEC = ... # type: int
\r
7 DN_ACCESS = ... # type: int
\r
8 DN_ATTRIB = ... # type: int
\r
9 DN_CREATE = ... # type: int
\r
10 DN_DELETE = ... # type: int
\r
11 DN_MODIFY = ... # type: int
\r
12 DN_MULTISHOT = ... # type: int
\r
13 DN_RENAME = ... # type: int
\r
14 F_DUPFD = ... # type: int
\r
15 F_DUPFD_CLOEXEC = ... # type: int
\r
16 F_FULLFSYNC = ... # type: int
\r
17 F_EXLCK = ... # type: int
\r
18 F_GETFD = ... # type: int
\r
19 F_GETFL = ... # type: int
\r
20 F_GETLEASE = ... # type: int
\r
21 F_GETLK = ... # type: int
\r
22 F_GETLK64 = ... # type: int
\r
23 F_GETOWN = ... # type: int
\r
24 F_NOCACHE = ... # type: int
\r
25 F_GETSIG = ... # type: int
\r
26 F_NOTIFY = ... # type: int
\r
27 F_RDLCK = ... # type: int
\r
28 F_SETFD = ... # type: int
\r
29 F_SETFL = ... # type: int
\r
30 F_SETLEASE = ... # type: int
\r
31 F_SETLK = ... # type: int
\r
32 F_SETLK64 = ... # type: int
\r
33 F_SETLKW = ... # type: int
\r
34 F_SETLKW64 = ... # type: int
\r
35 F_SETOWN = ... # type: int
\r
36 F_SETSIG = ... # type: int
\r
37 F_SHLCK = ... # type: int
\r
38 F_UNLCK = ... # type: int
\r
39 F_WRLCK = ... # type: int
\r
40 I_ATMARK = ... # type: int
\r
41 I_CANPUT = ... # type: int
\r
42 I_CKBAND = ... # type: int
\r
43 I_FDINSERT = ... # type: int
\r
44 I_FIND = ... # type: int
\r
45 I_FLUSH = ... # type: int
\r
46 I_FLUSHBAND = ... # type: int
\r
47 I_GETBAND = ... # type: int
\r
48 I_GETCLTIME = ... # type: int
\r
49 I_GETSIG = ... # type: int
\r
50 I_GRDOPT = ... # type: int
\r
51 I_GWROPT = ... # type: int
\r
52 I_LINK = ... # type: int
\r
53 I_LIST = ... # type: int
\r
54 I_LOOK = ... # type: int
\r
55 I_NREAD = ... # type: int
\r
56 I_PEEK = ... # type: int
\r
57 I_PLINK = ... # type: int
\r
58 I_POP = ... # type: int
\r
59 I_PUNLINK = ... # type: int
\r
60 I_PUSH = ... # type: int
\r
61 I_RECVFD = ... # type: int
\r
62 I_SENDFD = ... # type: int
\r
63 I_SETCLTIME = ... # type: int
\r
64 I_SETSIG = ... # type: int
\r
65 I_SRDOPT = ... # type: int
\r
66 I_STR = ... # type: int
\r
67 I_SWROPT = ... # type: int
\r
68 I_UNLINK = ... # type: int
\r
69 LOCK_EX = ... # type: int
\r
70 LOCK_MAND = ... # type: int
\r
71 LOCK_NB = ... # type: int
\r
72 LOCK_READ = ... # type: int
\r
73 LOCK_RW = ... # type: int
\r
74 LOCK_SH = ... # type: int
\r
75 LOCK_UN = ... # type: int
\r
76 LOCK_WRITE = ... # type: int
\r
78 _AnyFile = Union[int, IO[Any], IOBase]
\r
80 # TODO All these return either int or bytes depending on the value of
\r
81 # cmd (not on the type of arg).
\r
82 def fcntl(fd: _AnyFile,
\r
84 arg: Union[int, bytes] = ...) -> Any: ...
\r
85 # TODO This function accepts any object supporting a buffer interface,
\r
86 # as arg, is there a better way to express this than bytes?
\r
87 def ioctl(fd: _AnyFile,
\r
89 arg: Union[int, bytes] = ...,
\r
90 mutate_flag: bool = ...) -> Any: ...
\r
91 def flock(fd: _AnyFile, operation: int) -> None: ...
\r
92 def lockf(fd: _AnyFile,
\r
96 whence: int = ...) -> Any: ...
\r