Lichen

Annotated lib/posix/io.py

933:520036942e1e
2021-06-28 Paul Boddie Removed "WikiWord" prevention syntax since MoinLight ignores it.
paul@6 1
#!/usr/bin/env python
paul@6 2
paul@328 3
"""
paul@328 4
POSIX input/output functions.
paul@328 5
paul@527 6
Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
paul@328 7
paul@328 8
This program is free software; you can redistribute it and/or modify it under
paul@328 9
the terms of the GNU General Public License as published by the Free Software
paul@328 10
Foundation; either version 3 of the License, or (at your option) any later
paul@328 11
version.
paul@328 12
paul@328 13
This program is distributed in the hope that it will be useful, but WITHOUT
paul@328 14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
paul@328 15
FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
paul@328 16
details.
paul@328 17
paul@328 18
You should have received a copy of the GNU General Public License along with
paul@328 19
this program.  If not, see <http://www.gnu.org/licenses/>.
paul@328 20
"""
paul@328 21
paul@529 22
from libc.io import close, fdopen, read, write
paul@352 23
paul@6 24
def closerange(fd_low, fd_high): pass
paul@6 25
def dup(fd): pass
paul@6 26
def dup2(old_fd, new_fd): pass
paul@328 27
def fchdir(fd): pass
paul@6 28
def fchmod(fd, mode): pass
paul@6 29
def fchown(fd, uid, gid): pass
paul@328 30
def fdatasync(fd): pass
paul@6 31
def fpathconf(fd, name): pass
paul@6 32
def fstat(fd): pass
paul@6 33
def fstatvfs(fd): pass
paul@328 34
def fsync(fd): pass
paul@6 35
def ftruncate(fd, length): pass
paul@6 36
def isatty(fd): pass
paul@328 37
paul@328 38
SEEK_CUR = 1
paul@328 39
SEEK_END = 2
paul@328 40
SEEK_SET = 0
paul@328 41
paul@6 42
def lseek(fd, pos, how): pass
paul@6 43
def open(filename, flag, mode=0777): pass
paul@6 44
def openpty(): pass
paul@6 45
def pipe(): pass
paul@6 46
def putenv(key, value): pass
paul@6 47
def times(): pass
paul@6 48
def ttyname(fd): pass
paul@6 49
def umask(new_mask): pass
paul@6 50
def uname(): pass
paul@6 51
def unsetenv(key): pass
paul@328 52
paul@336 53
# Constants.
paul@336 54
paul@6 55
O_APPEND = 1024
paul@6 56
O_ASYNC = 8192
paul@6 57
O_CREAT = 64
paul@6 58
O_DIRECT = 16384
paul@6 59
O_DIRECTORY = 65536
paul@6 60
O_DSYNC = 4096
paul@6 61
O_EXCL = 128
paul@6 62
O_LARGEFILE = 32768
paul@6 63
O_NDELAY = 2048
paul@6 64
O_NOATIME = 262144
paul@6 65
O_NOCTTY = 256
paul@6 66
O_NOFOLLOW = 131072
paul@6 67
O_NONBLOCK = 2048
paul@6 68
O_RDONLY = 0
paul@6 69
O_RDWR = 2
paul@6 70
O_RSYNC = 1052672
paul@6 71
O_SYNC = 1052672
paul@6 72
O_TRUNC = 512
paul@6 73
O_WRONLY = 1
paul@6 74
paul@6 75
# vim: tabstop=4 expandtab shiftwidth=4