Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/lib64/python2....
File: stat.py
"""Constants/functions for interpreting results of os.stat() and os.lstat().
[0] Fix | Delete
[1] Fix | Delete
Suggested usage: from stat import *
[2] Fix | Delete
"""
[3] Fix | Delete
[4] Fix | Delete
# Indices for stat struct members in the tuple returned by os.stat()
[5] Fix | Delete
[6] Fix | Delete
ST_MODE = 0
[7] Fix | Delete
ST_INO = 1
[8] Fix | Delete
ST_DEV = 2
[9] Fix | Delete
ST_NLINK = 3
[10] Fix | Delete
ST_UID = 4
[11] Fix | Delete
ST_GID = 5
[12] Fix | Delete
ST_SIZE = 6
[13] Fix | Delete
ST_ATIME = 7
[14] Fix | Delete
ST_MTIME = 8
[15] Fix | Delete
ST_CTIME = 9
[16] Fix | Delete
[17] Fix | Delete
# Extract bits from the mode
[18] Fix | Delete
[19] Fix | Delete
def S_IMODE(mode):
[20] Fix | Delete
return mode & 07777
[21] Fix | Delete
[22] Fix | Delete
def S_IFMT(mode):
[23] Fix | Delete
return mode & 0170000
[24] Fix | Delete
[25] Fix | Delete
# Constants used as S_IFMT() for various file types
[26] Fix | Delete
# (not all are implemented on all systems)
[27] Fix | Delete
[28] Fix | Delete
S_IFDIR = 0040000
[29] Fix | Delete
S_IFCHR = 0020000
[30] Fix | Delete
S_IFBLK = 0060000
[31] Fix | Delete
S_IFREG = 0100000
[32] Fix | Delete
S_IFIFO = 0010000
[33] Fix | Delete
S_IFLNK = 0120000
[34] Fix | Delete
S_IFSOCK = 0140000
[35] Fix | Delete
[36] Fix | Delete
# Functions to test for each file type
[37] Fix | Delete
[38] Fix | Delete
def S_ISDIR(mode):
[39] Fix | Delete
return S_IFMT(mode) == S_IFDIR
[40] Fix | Delete
[41] Fix | Delete
def S_ISCHR(mode):
[42] Fix | Delete
return S_IFMT(mode) == S_IFCHR
[43] Fix | Delete
[44] Fix | Delete
def S_ISBLK(mode):
[45] Fix | Delete
return S_IFMT(mode) == S_IFBLK
[46] Fix | Delete
[47] Fix | Delete
def S_ISREG(mode):
[48] Fix | Delete
return S_IFMT(mode) == S_IFREG
[49] Fix | Delete
[50] Fix | Delete
def S_ISFIFO(mode):
[51] Fix | Delete
return S_IFMT(mode) == S_IFIFO
[52] Fix | Delete
[53] Fix | Delete
def S_ISLNK(mode):
[54] Fix | Delete
return S_IFMT(mode) == S_IFLNK
[55] Fix | Delete
[56] Fix | Delete
def S_ISSOCK(mode):
[57] Fix | Delete
return S_IFMT(mode) == S_IFSOCK
[58] Fix | Delete
[59] Fix | Delete
# Names for permission bits
[60] Fix | Delete
[61] Fix | Delete
S_ISUID = 04000
[62] Fix | Delete
S_ISGID = 02000
[63] Fix | Delete
S_ENFMT = S_ISGID
[64] Fix | Delete
S_ISVTX = 01000
[65] Fix | Delete
S_IREAD = 00400
[66] Fix | Delete
S_IWRITE = 00200
[67] Fix | Delete
S_IEXEC = 00100
[68] Fix | Delete
S_IRWXU = 00700
[69] Fix | Delete
S_IRUSR = 00400
[70] Fix | Delete
S_IWUSR = 00200
[71] Fix | Delete
S_IXUSR = 00100
[72] Fix | Delete
S_IRWXG = 00070
[73] Fix | Delete
S_IRGRP = 00040
[74] Fix | Delete
S_IWGRP = 00020
[75] Fix | Delete
S_IXGRP = 00010
[76] Fix | Delete
S_IRWXO = 00007
[77] Fix | Delete
S_IROTH = 00004
[78] Fix | Delete
S_IWOTH = 00002
[79] Fix | Delete
S_IXOTH = 00001
[80] Fix | Delete
[81] Fix | Delete
# Names for file flags
[82] Fix | Delete
[83] Fix | Delete
UF_NODUMP = 0x00000001
[84] Fix | Delete
UF_IMMUTABLE = 0x00000002
[85] Fix | Delete
UF_APPEND = 0x00000004
[86] Fix | Delete
UF_OPAQUE = 0x00000008
[87] Fix | Delete
UF_NOUNLINK = 0x00000010
[88] Fix | Delete
UF_COMPRESSED = 0x00000020 # OS X: file is hfs-compressed
[89] Fix | Delete
UF_HIDDEN = 0x00008000 # OS X: file should not be displayed
[90] Fix | Delete
SF_ARCHIVED = 0x00010000
[91] Fix | Delete
SF_IMMUTABLE = 0x00020000
[92] Fix | Delete
SF_APPEND = 0x00040000
[93] Fix | Delete
SF_NOUNLINK = 0x00100000
[94] Fix | Delete
SF_SNAPSHOT = 0x00200000
[95] Fix | Delete
[96] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function