Lichen

lib/posix/stat.py

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