Lines Matching refs:stat

11 import stat
661 os.stat(path).st_mode & 0o777,
690 self.assertEqual(os.stat(extracted).st_mode & 0o777, 0o755)
1086 s = os.stat(filename)
1103 # Return True if the platform knows the st_blocks stat attribute and
1117 s = os.stat(name)
1602 mode = os.stat(tmpname).st_mode & 0o777
3075 now = pathlib.Path(TEMPDIR).stat().st_mtime
3080 mtime = path.stat().st_mtime
3082 # Some systems can't stat symlinks, ignore those
3086 self.assertGreaterEqual(path.stat().st_mtime, now)
3091 dir_mode = pathlib.Path(TEMPDIR).stat().st_mode
3094 regular_file_mode = regular_file.stat().st_mode
3099 self.assertEqual(path.stat().st_mode, dir_mode)
3101 self.assertEqual(path.stat().st_mode,
3233 """Inverse of `stat.filemode` (for permission bits)
3239 {'r': stat.S_IRUSR, '-': 0}[str_mode[0]]
3240 | {'w': stat.S_IWUSR, '-': 0}[str_mode[1]]
3241 | {'x': stat.S_IXUSR, '-': 0,
3242 's': stat.S_IXUSR | stat.S_ISUID,
3243 'S': stat.S_ISUID}[str_mode[2]]
3244 | {'r': stat.S_IRGRP, '-': 0}[str_mode[3]]
3245 | {'w': stat.S_IWGRP, '-': 0}[str_mode[4]]
3246 | {'x': stat.S_IXGRP, '-': 0,
3247 's': stat.S_IXGRP | stat.S_ISGID,
3248 'S': stat.S_ISGID}[str_mode[5]]
3249 | {'r': stat.S_IROTH, '-': 0}[str_mode[6]]
3250 | {'w': stat.S_IWOTH, '-': 0}[str_mode[7]]
3251 | {'x': stat.S_IXOTH, '-': 0,
3252 't': stat.S_IXOTH | stat.S_ISVTX,
3253 'T': stat.S_ISVTX}[str_mode[8]]
3256 assert stat.filemode(result)[1:] == mode[1:]
3372 got = stat.filemode(stat.S_IMODE(path.stat().st_mode))
3612 os.chmod(tmp_filename, os.stat(tmp_filename).st_mode | stat.S_ISVTX)
3613 have_sticky_files = (os.stat(tmp_filename).st_mode & stat.S_ISVTX)
3617 os.chmod(tmp_filename, os.stat(tmp_filename).st_mode | stat.S_ISVTX)
3618 have_sticky_dirs = (os.stat(tmp_filename).st_mode & stat.S_ISVTX)
3644 normal_dir_mode = stat.filemode(stat.S_IMODE(
3645 self.outerdir.stat().st_mode))