|
1 | 1 | # Stubs for os
|
2 | 2 | # Ron Murawski <[email protected]>
|
3 | 3 |
|
4 |
| -from builtins import OSError as error |
5 | 4 | from io import TextIOWrapper as _TextIOWrapper
|
6 | 5 | import sys
|
7 | 6 | from typing import (
|
8 | 7 | Mapping, MutableMapping, Dict, List, Any, Tuple, IO, Iterable, Iterator, overload, Union, AnyStr,
|
9 | 8 | Optional, Generic, Set, Callable, Text, Sequence, NamedTuple, TypeVar, ContextManager
|
10 | 9 | )
|
11 |
| -from . import path as path |
12 | 10 | from mypy_extensions import NoReturn
|
13 | 11 |
|
| 12 | +# Re-exported names from other modules. |
| 13 | +from builtins import OSError as error |
| 14 | +from posix import stat_result as stat_result |
| 15 | +from . import path as path |
| 16 | + |
14 | 17 | _T = TypeVar('_T')
|
15 | 18 |
|
16 | 19 | # ----- os variables -----
|
@@ -216,49 +219,6 @@ elif sys.version_info >= (3, 5):
|
216 | 219 | def stat(self) -> stat_result: ...
|
217 | 220 |
|
218 | 221 |
|
219 |
| -class stat_result: |
220 |
| - # For backward compatibility, the return value of stat() is also |
221 |
| - # accessible as a tuple of at least 10 integers giving the most important |
222 |
| - # (and portable) members of the stat structure, in the order st_mode, |
223 |
| - # st_ino, st_dev, st_nlink, st_uid, st_gid, st_size, st_atime, st_mtime, |
224 |
| - # st_ctime. More items may be added at the end by some implementations. |
225 |
| - |
226 |
| - st_mode: int # protection bits, |
227 |
| - st_ino: int # inode number, |
228 |
| - st_dev: int # device, |
229 |
| - st_nlink: int # number of hard links, |
230 |
| - st_uid: int # user id of owner, |
231 |
| - st_gid: int # group id of owner, |
232 |
| - st_size: int # size of file, in bytes, |
233 |
| - st_atime: float # time of most recent access, |
234 |
| - st_mtime: float # time of most recent content modification, |
235 |
| - st_ctime: float # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows) |
236 |
| - |
237 |
| - if sys.version_info >= (3, 3): |
238 |
| - st_atime_ns: int # time of most recent access, in nanoseconds |
239 |
| - st_mtime_ns: int # time of most recent content modification in nanoseconds |
240 |
| - st_ctime_ns: int # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows) in nanoseconds |
241 |
| - |
242 |
| - # not documented |
243 |
| - def __init__(self, tuple: Tuple[int, ...]) -> None: ... |
244 |
| - |
245 |
| - # On some Unix systems (such as Linux), the following attributes may also |
246 |
| - # be available: |
247 |
| - st_blocks: int # number of blocks allocated for file |
248 |
| - st_blksize: int # filesystem blocksize |
249 |
| - st_rdev: int # type of device if an inode device |
250 |
| - st_flags: int # user defined flags for file |
251 |
| - |
252 |
| - # On other Unix systems (such as FreeBSD), the following attributes may be |
253 |
| - # available (but may be only filled out if root tries to use them): |
254 |
| - st_gen: int # file generation number |
255 |
| - st_birthtime: int # time of file creation |
256 |
| - |
257 |
| - # On Mac OS systems, the following attributes may also be available: |
258 |
| - st_rsize: int |
259 |
| - st_creator: int |
260 |
| - st_type: int |
261 |
| - |
262 | 222 | class statvfs_result: # Unix only
|
263 | 223 | f_bsize: int
|
264 | 224 | f_frsize: int
|
|
0 commit comments