Lichen

Annotated lib/posix/stat.py

927:246bee64c824
2021-06-27 Paul Boddie Merged the int-as-function branch.
paul@6 1
#!/usr/bin/env python
paul@6 2
paul@6 3
class stat_result:
paul@6 4
    def __init__(self, st_atime, st_blksize, st_blocks, st_ctime, st_dev, st_gid, st_ino, st_mode, st_mtime, st_nlink, st_rdev, st_size, st_uid):
paul@6 5
        self.st_atime = st_atime
paul@6 6
        self.st_blksize = st_blksize
paul@6 7
        self.st_blocks = st_blocks
paul@6 8
        self.st_ctime = st_ctime
paul@6 9
        self.st_dev = st_dev
paul@6 10
        self.st_gid = st_gid
paul@6 11
        self.st_ino = st_ino
paul@6 12
        self.st_mode = st_mode
paul@6 13
        self.st_mtime = st_mtime
paul@6 14
        self.st_nlink = st_nlink
paul@6 15
        self.st_rdev = st_rdev
paul@6 16
        self.st_size = st_size
paul@6 17
        self.st_uid = st_uid
paul@6 18
paul@6 19
    n_fields = 16
paul@6 20
    n_sequence_fields = 10
paul@6 21
    n_unnamed_fields = 3
paul@6 22
paul@6 23
class statvfs_result:
paul@6 24
    def __init__(self, f_bavail, f_bfree, f_blocks, f_bsize, f_favail, f_ffree, f_files, f_flag, f_frsize, f_namemax):
paul@6 25
        self.f_bavail = f_bavail
paul@6 26
        self.f_bfree = f_bfree
paul@6 27
        self.f_blocks = f_blocks
paul@6 28
        self.f_bsize = f_bsize
paul@6 29
        self.f_favail = f_favail
paul@6 30
        self.f_ffree = f_ffree
paul@6 31
        self.f_files = f_files
paul@6 32
        self.f_flag = f_flag
paul@6 33
        self.f_frsize = f_frsize
paul@6 34
        self.f_namemax = f_namemax
paul@6 35
paul@6 36
    n_fields = 10
paul@6 37
    n_sequence_fields = 10
paul@6 38
    n_unnamed_fields = 0
paul@6 39
paul@6 40
def stat(path): pass
paul@6 41
def stat_float_times(newval=None): pass
paul@6 42
def statvfs(path): pass
paul@6 43
paul@6 44
ST_APPEND = 256
paul@6 45
ST_MANDLOCK = 64
paul@6 46
ST_NOATIME = 1024
paul@6 47
ST_NODEV = 4
paul@6 48
ST_NODIRATIME = 2048
paul@6 49
ST_NOEXEC = 8
paul@6 50
ST_NOSUID = 2
paul@6 51
ST_RDONLY = 1
paul@6 52
ST_RELATIME = 4096
paul@6 53
ST_SYNCHRONOUS = 16
paul@6 54
ST_WRITE = 128
paul@6 55
paul@6 56
# vim: tabstop=4 expandtab shiftwidth=4