this repo has no description
1#!/usr/bin/env python3
2# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
3"""The _os module provides os facilities very early in the bootstrapping
4process. It is used primarily by the _io module before it is possible to bring
5up the usual CPython os module."""
6
7from _builtins import _builtin
8
9
10# TODO(emacs): Detect if "posix" or "nt" is in sys.builtin_module_names and set
11# linesep accordingly
12name = "posix"
13linesep = "\n"
14F_OK = 0
15X_OK = 1
16W_OK = 2
17R_OK = 4
18
19
20def access(path, mode):
21 _builtin()
22
23
24def close(fd):
25 _builtin()
26
27
28def fstat_size(fd):
29 """Equivalent to os.stat(fd).st_size, but without having to reflect the
30 stat struct into Python."""
31 _builtin()
32
33
34def ftruncate(fd, size):
35 _builtin()
36
37
38def isatty(fd):
39 _builtin()
40
41
42def isdir(fd):
43 _builtin()
44
45
46def lseek(fd, offset, whence):
47 _builtin()
48
49
50def open(fd, flags, mode=0o777, dir_fd=None):
51 _builtin()
52
53
54def parse_mode(mode):
55 _builtin()
56
57
58def read(fd, count):
59 _builtin()
60
61
62def set_noinheritable(fd):
63 _builtin()