Lines Matching full:mode
19 # Extract bits from the mode
21 def S_IMODE(mode): argument
22 """Return the portion of the file's mode that can be set by
25 return mode & 0o7777
27 def S_IFMT(mode): argument
28 """Return the portion of the file's mode that describes the
31 return mode & 0o170000
50 def S_ISDIR(mode): argument
51 """Return True if mode is from a directory."""
52 return S_IFMT(mode) == S_IFDIR
54 def S_ISCHR(mode): argument
55 """Return True if mode is from a character special device file."""
56 return S_IFMT(mode) == S_IFCHR
58 def S_ISBLK(mode): argument
59 """Return True if mode is from a block special device file."""
60 return S_IFMT(mode) == S_IFBLK
62 def S_ISREG(mode): argument
63 """Return True if mode is from a regular file."""
64 return S_IFMT(mode) == S_IFREG
66 def S_ISFIFO(mode): argument
67 """Return True if mode is from a FIFO (named pipe)."""
68 return S_IFMT(mode) == S_IFIFO
70 def S_ISLNK(mode): argument
71 """Return True if mode is from a symbolic link."""
72 return S_IFMT(mode) == S_IFLNK
74 def S_ISSOCK(mode): argument
75 """Return True if mode is from a socket."""
76 return S_IFMT(mode) == S_IFSOCK
78 def S_ISDOOR(mode): argument
79 """Return True if mode is from a door."""
82 def S_ISPORT(mode): argument
83 """Return True if mode is from an event port."""
86 def S_ISWHT(mode): argument
87 """Return True if mode is from a whiteout."""
156 def filemode(mode): argument
157 """Convert a file's mode to a string of the form '-rwxrwxrwx'."""
161 if mode & bit == bit: