/aosp_15_r20/external/python/cpython2/Lib/test/ |
D | test_stat.py | 63 st_mode = os.lstat(fname).st_mode 65 st_mode = os.stat(fname).st_mode 66 return st_mode 90 st_mode = self.get_mode() 91 self.assertS_IS("REG", st_mode) 92 self.assertEqual(stat.S_IMODE(st_mode), 96 st_mode = self.get_mode() 97 self.assertS_IS("REG", st_mode) 98 self.assertEqual(stat.S_IMODE(st_mode), 102 st_mode = self.get_mode() [all …]
|
/aosp_15_r20/external/python/cpython3/Lib/test/ |
D | test_stat.py | 93 st_mode = os.lstat(fname).st_mode 95 st_mode = os.stat(fname).st_mode 96 modestr = self.statmod.filemode(st_mode) 97 return st_mode, modestr 122 st_mode, modestr = self.get_mode() 124 self.assertS_IS("REG", st_mode) 125 self.assertEqual(self.statmod.S_IMODE(st_mode), 129 st_mode, modestr = self.get_mode() 131 self.assertS_IS("REG", st_mode) 132 self.assertEqual(self.statmod.S_IMODE(st_mode), [all …]
|
/aosp_15_r20/system/core/mkbootfs/ |
H A D | mkbootfs.cpp | 61 s->st_mode = p->mode | (s->st_mode & ~07777); in fix_stat() 67 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); in fix_stat() 70 unsigned st_mode = s->st_mode; in fix_stat() local 71 int is_dir = S_ISDIR(s->st_mode) || strcmp(path, TRAILER) == 0; in fix_stat() 72 fs_config(path, is_dir, target_out_path, &s->st_uid, &s->st_gid, &st_mode, &capabilities); in fix_stat() 73 s->st_mode = (typeof(s->st_mode)) st_mode; in fix_stat() 76 if (S_ISREG(s->st_mode) || S_ISDIR(s->st_mode) || S_ISLNK(s->st_mode)) { in fix_stat() 100 s->st_mode, in _eject() 217 if(S_ISREG(s.st_mode)){ in _archive() 224 } else if(S_ISDIR(s.st_mode)) { in _archive() [all …]
|
/aosp_15_r20/external/toybox/toys/other/ |
H A D | lsattr.c | 113 if(!S_ISREG(sb->st_mode) && !S_ISDIR(sb->st_mode)) { in ext2_getflag() 139 if (!stat(path, &sb) && !S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) { in print_file_attr() 190 if (S_ISDIR(root->st.st_mode) && !root->parent) in retell_dir() 196 if (S_ISDIR(root->st.st_mode) && FLAG(R) && dirtree_notdotdot(root)) { in retell_dir() 214 else if (S_ISDIR(sb.st_mode) && !FLAG(d)) in lsattr_main() 227 if (!S_ISREG(sb->st_mode) && !S_ISDIR(sb->st_mode)) { in ext2_setflag() 269 if ((S_ISLNK(root->st.st_mode) && FLAG(R)) in update_attr() 270 || (!S_ISREG(root->st.st_mode) && !S_ISLNK(root->st.st_mode) in update_attr() 271 && !S_ISDIR(root->st.st_mode))) in update_attr() 297 if (!S_ISDIR(root->st.st_mode)) new &= ~FS_DIRSYNC_FL; in update_attr() [all …]
|
/aosp_15_r20/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot/usr/include/i386-linux-gnu/bits/ |
D | stat.h | 58 __mode_t st_mode; /* File mode. */ member 62 __mode_t st_mode; /* File mode. */ member 125 __mode_t st_mode; /* File mode. */ member 129 __mode_t st_mode; /* File mode. */ member 192 #define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) 193 #define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) 194 #define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
|
/aosp_15_r20/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot/usr/include/x86_64-linux-gnu/bits/ |
D | stat.h | 58 __mode_t st_mode; /* File mode. */ member 62 __mode_t st_mode; /* File mode. */ member 125 __mode_t st_mode; /* File mode. */ member 129 __mode_t st_mode; /* File mode. */ member 192 #define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) 193 #define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) 194 #define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
|
/aosp_15_r20/external/toybox/toys/pending/ |
H A D | diff.c | 349 if ((j = !strcmp(files[i], "-")) || S_ISFIFO(TT.st[i].st_mode)) { in diff() 523 if (S_ISDIR(node->st.st_mode) && !node->parent) { //add root dirs. in list_dir() 528 if (S_ISDIR(node->st.st_mode) && FLAG(r)) { in list_dir() 537 …return S_ISDIR(node->st.st_mode) ? 0 : (DIRTREE_RECURSE|((FLAG(no_dereference)) ? 0 : DIRTREE_SYMF… in list_dir() 781 if (!S_ISREG(st[i].st_mode) && !S_ISDIR(st[i].st_mode) && !S_ISLNK(st[i].st_mode)) { in create_empty_entry() 789 else if ((st[0].st_mode & S_IFMT) != (st[1].st_mode & S_IFMT)) { in create_empty_entry() 790 i = S_ISREG(st[0].st_mode) + 2 * S_ISLNK(st[0].st_mode); in create_empty_entry() 791 int k = S_ISREG(st[1].st_mode) + 2 * S_ISLNK(st[1].st_mode); in create_empty_entry() 795 } else if (S_ISDIR(st[0].st_mode)) in create_empty_entry() 797 else if (S_ISLNK(st[0].st_mode)) { in create_empty_entry() [all …]
|
/aosp_15_r20/external/toybox/toys/posix/ |
H A D | cp.c | 165 if (S_ISDIR(try->st.st_mode) && (try->again&DIRTREE_COMEAGAIN)) { in cp_node() 178 if (S_ISLNK(try->st.st_mode) && FLAG(d)) rr++; in cp_node() 192 if (!faccessat(cfd, catch, F_OK, 0) && !S_ISDIR(cst.st_mode)) { in cp_node() 193 if (S_ISDIR(try->st.st_mode)) in cp_node() 220 if (S_ISDIR(try->st.st_mode)) { in cp_node() 236 if (!mkdirat(cfd, catch, try->st.st_mode | 0200) || errno == EEXIST) in cp_node() 238 if (!fstat(try->extra, &st2) && S_ISDIR(st2.st_mode)) in cp_node() 272 } else if (!S_ISREG(try->st.st_mode) in cp_node() 276 if (S_ISLNK(try->st.st_mode) in cp_node() 280 : !mknodat(cfd, catch, try->st.st_mode, try->st.st_rdev)) in cp_node() [all …]
|
/aosp_15_r20/external/python/pyfakefs/pyfakefs/ |
D | helpers.py | 201 self.st_mode: int = 0 225 and self.st_mode == other.st_mode 243 self.st_mode = stat_result.st_mode 283 if self.st_mode & S_IFLNK == S_IFLNK and self.is_windows: 314 st_mode = self.st_mode 315 if st_mode & stat.S_IFDIR: 317 if st_mode & stat.S_IFREG: 319 if st_mode & (stat.S_IFCHR | stat.S_IFBLK): 321 if st_mode & stat.S_IFLNK: 331 if self.st_mode & stat.S_IFLNK: [all …]
|
D | fake_filesystem.py | 517 new_dir.st_mode = S_IFDIR | helpers.PERM_DEF 699 if S_ISLNK(file_object.st_mode): 711 is_error = S_ISREG(file_object.st_mode) 713 is_error = not S_ISLNK(file_object.st_mode) 715 is_error = not S_ISDIR(file_object.st_mode) 742 file_object.st_mode = file_object.st_mode | 0o222 744 file_object.st_mode = file_object.st_mode & 0o777555 746 file_object.st_mode = (file_object.st_mode & ~helpers.PERM_ALL) | ( 1512 elif S_ISLNK(directory.st_mode): 1625 if S_ISLNK(target.st_mode): [all …]
|
/aosp_15_r20/external/lz4/programs/ |
H A D | util.h | 136 # define UTIL_STAT_MODE_ISREG(st_mode) ((st_mode) & S_IFREG) argument 141 # define UTIL_STAT_MODE_ISREG(st_mode) ((st_mode) & S_IFREG) argument 146 # define UTIL_STAT_MODE_ISREG(st_mode) (S_ISREG(st_mode)) argument 254 res += chmod(filename, statbuf->st_mode & 07777); /* Copy file permissions */ in UTIL_setFileStat() 266 if (r || !(statbuf->st_mode & S_IFREG)) return 0; /* No good... */ in UTIL_getFDStat() 269 if (r || !S_ISREG(statbuf->st_mode)) return 0; /* No good... */ in UTIL_getFDStat() 279 if (r || !(statbuf->st_mode & S_IFREG)) return 0; /* No good... */ in UTIL_getFileStat() 282 if (r || !S_ISREG(statbuf->st_mode)) return 0; /* No good... */ in UTIL_getFileStat() 310 return (statbuf.st_mode & S_IFDIR); in UTIL_isDirectory() 314 return (S_ISDIR(statbuf.st_mode)); in UTIL_isDirectory() [all …]
|
/aosp_15_r20/frameworks/compile/mclinker/lib/Support/Unix/ |
D | PathV3.inc | 139 } else if (S_ISDIR(path_stat.st_mode)) 141 else if (S_ISREG(path_stat.st_mode)) 143 else if (S_ISBLK(path_stat.st_mode)) 145 else if (S_ISCHR(path_stat.st_mode)) 147 else if (S_ISFIFO(path_stat.st_mode)) 149 else if (S_ISSOCK(path_stat.st_mode)) 164 if (S_ISREG(path_stat.st_mode)) 166 if (S_ISDIR(path_stat.st_mode)) 168 if (S_ISLNK(path_stat.st_mode)) 170 if (S_ISBLK(path_stat.st_mode)) [all …]
|
/aosp_15_r20/external/sandboxed-api/sandboxed_api/sandbox2/ |
H A D | namespace.cc | 156 switch (st.st_mode & S_IFMT) { in LogFilesystem() 173 type_and_mode += st.st_mode & S_IRUSR ? 'r' : '-'; in LogFilesystem() 174 type_and_mode += st.st_mode & S_IWUSR ? 'w' : '-'; in LogFilesystem() 175 type_and_mode += st.st_mode & S_IXUSR ? 'x' : '-'; in LogFilesystem() 176 type_and_mode += st.st_mode & S_IRGRP ? 'r' : '-'; in LogFilesystem() 177 type_and_mode += st.st_mode & S_IWGRP ? 'w' : '-'; in LogFilesystem() 178 type_and_mode += st.st_mode & S_IXGRP ? 'x' : '-'; in LogFilesystem() 179 type_and_mode += st.st_mode & S_IROTH ? 'r' : '-'; in LogFilesystem() 180 type_and_mode += st.st_mode & S_IWOTH ? 'w' : '-'; in LogFilesystem() 181 type_and_mode += st.st_mode & S_IXOTH ? 'x' : '-'; in LogFilesystem() [all …]
|
/aosp_15_r20/frameworks/base/libs/androidfw/ |
H A D | misc.cpp | 53 if (S_ISREG(sb.st_mode)) in getFileType() 55 else if (S_ISDIR(sb.st_mode)) in getFileType() 57 else if (S_ISCHR(sb.st_mode)) in getFileType() 59 else if (S_ISBLK(sb.st_mode)) in getFileType() 61 else if (S_ISFIFO(sb.st_mode)) in getFileType() 64 else if (S_ISLNK(sb.st_mode)) in getFileType() 68 else if (S_ISSOCK(sb.st_mode)) in getFileType()
|
/aosp_15_r20/external/squashfs-tools/squashfs-tools/ |
H A D | action.c | 851 static int file_type_match(int st_mode, int type) in file_type_match() argument 855 return S_ISDIR(st_mode); in file_type_match() 857 return S_ISREG(st_mode); in file_type_match() 859 return S_ISREG(st_mode) || S_ISDIR(st_mode) || in file_type_match() 860 S_ISCHR(st_mode) || S_ISBLK(st_mode) || in file_type_match() 861 S_ISFIFO(st_mode) || S_ISSOCK(st_mode); in file_type_match() 863 return S_ISLNK(st_mode); in file_type_match() 884 int st_mode = dir_ent->inode->buf.st_mode; in eval_actions() local 897 if (!file_type_match(st_mode, action->action->file_types)) in eval_actions() 1411 static int mode_execute(struct mode_data *mode_data, int st_mode) in mode_execute() argument [all …]
|
/aosp_15_r20/external/flac/src/share/grabbag/ |
H A D | file.c | 66 (void)flac_chmod(destpath, srcstat.st_mode); in grabbag__file_copy_metadata() 103 stats.st_mode &= ~S_IWUSR; in grabbag__file_change_stats() 104 stats.st_mode &= ~S_IWGRP; in grabbag__file_change_stats() 105 stats.st_mode &= ~S_IWOTH; in grabbag__file_change_stats() 108 stats.st_mode |= S_IWUSR; in grabbag__file_change_stats() 112 stats.st_mode &= ~S_IWRITE; in grabbag__file_change_stats() 114 stats.st_mode |= S_IWRITE; in grabbag__file_change_stats() 116 if(0 != flac_chmod(filename, stats.st_mode)) in grabbag__file_change_stats()
|
/aosp_15_r20/bootable/recovery/tests/unit/ |
H A D | dirutil_test.cpp | 60 ASSERT_TRUE(S_ISDIR(sb.st_mode)); in TEST() 62 ASSERT_EQ(mode, sb.st_mode & mask); in TEST() 78 ASSERT_TRUE(S_ISDIR(sb.st_mode)); in TEST() 97 ASSERT_TRUE(S_ISDIR(sb.st_mode)); in TEST() 99 ASSERT_EQ(mode, sb.st_mode & mask); in TEST() 103 ASSERT_TRUE(S_ISDIR(sb.st_mode)); in TEST() 104 ASSERT_EQ(mode, sb.st_mode & mask); in TEST()
|
/aosp_15_r20/external/libbrillo/brillo/ |
H A D | file_utils.cc | 83 S_ISREG(file_stat.st_mode) && file_stat.st_uid == uid && in RegularFileOrDelete() 287 if (!S_ISDIR(st.st_mode)) { in OpenSafely() 288 LOG(ERROR) << path.value() << " is not a directory: " << st.st_mode; in OpenSafely() 291 } else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode)) { in OpenSafely() 293 << " is not a regular file or directory: " << st.st_mode; in OpenSafely() 317 if (!S_ISDIR(st.st_mode)) { in OpenAtSafely() 318 LOG(ERROR) << path.value() << " is not a directory: " << st.st_mode; in OpenAtSafely() 321 } else if (!S_ISREG(st.st_mode)) { in OpenAtSafely() 322 LOG(ERROR) << path.value() << " is not a regular file: " << st.st_mode; in OpenAtSafely() 348 if (!S_ISFIFO(st.st_mode)) { in OpenFifoSafely() [all …]
|
/aosp_15_r20/libcore/ojluni/src/main/java/sun/nio/fs/ |
H A D | UnixFileAttributes.java | 40 private int st_mode; field in UnixFileAttributes 100 int mode() { return st_mode; } in mode() 125 int type = st_mode & UnixConstants.S_IFMT; in isDevice() 153 return ((st_mode & UnixConstants.S_IFMT) == UnixConstants.S_IFREG); in isRegularFile() 158 return ((st_mode & UnixConstants.S_IFMT) == UnixConstants.S_IFDIR); in isDirectory() 163 return ((st_mode & UnixConstants.S_IFMT) == UnixConstants.S_IFLNK); in isSymbolicLink() 168 int type = st_mode & UnixConstants.S_IFMT; in isOther() 217 int bits = (st_mode & UnixConstants.S_IAMB); in permissions()
|
/aosp_15_r20/frameworks/base/ravenwood/runtime-helper-src/libcore-fake/android/system/ |
H A D | StructStat.java | 33 public final int st_mode; /*mode_t*/ field in StructStat 86 public StructStat(long st_dev, long st_ino, int st_mode, long st_nlink, int st_uid, int st_gid, in StructStat() argument 89 this(st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, in StructStat() 97 public StructStat(long st_dev, long st_ino, int st_mode, long st_nlink, int st_uid, int st_gid, in StructStat() argument 102 this.st_mode = st_mode; in StructStat()
|
/aosp_15_r20/packages/modules/adb/sysdeps/ |
D | stat_test.cpp | 31 ASSERT_FALSE(S_ISREG(st.st_mode)); in TEST() 32 ASSERT_TRUE(S_ISDIR(st.st_mode)); in TEST() 35 ASSERT_TRUE(S_ISDIR(st.st_mode)); in TEST() 39 ASSERT_TRUE(S_ISDIR(st.st_mode)); in TEST() 55 ASSERT_TRUE(S_ISREG(st.st_mode)); in TEST() 56 ASSERT_FALSE(S_ISDIR(st.st_mode)); in TEST()
|
/aosp_15_r20/libcore/luni/src/main/java/android/system/ |
H A D | StructStat.java | 33 public final int st_mode; /*mode_t*/ field in StructStat 86 public StructStat(long st_dev, long st_ino, int st_mode, long st_nlink, int st_uid, int st_gid, in StructStat() argument 89 this(st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, in StructStat() 97 public StructStat(long st_dev, long st_ino, int st_mode, long st_nlink, int st_uid, int st_gid, in StructStat() argument 102 this.st_mode = st_mode; in StructStat()
|
/aosp_15_r20/external/ltp/testcases/kernel/syscalls/dup2/ |
H A D | dup202.c | 100 if (oldbuf.st_mode != newbuf.st_mode) in run() 102 oldbuf.st_mode, newbuf.st_mode); in run() 105 oldbuf.st_mode, newbuf.st_mode); in run()
|
/aosp_15_r20/external/libchrome/base/files/ |
H A D | file_util_posix.cc | 104 if (S_ISLNK(stat_info.st_mode)) { in VerifySpecificPathControlledByUser() 114 if ((stat_info.st_mode & S_IWGRP) && in VerifySpecificPathControlledByUser() 121 if (stat_info.st_mode & S_IWOTH) { in VerifySpecificPathControlledByUser() 234 DCHECK(recursive || S_ISDIR(from_stat.st_mode)); in DoCopyDirectory() 245 if (S_ISDIR(from_stat.st_mode)) { in DoCopyDirectory() 246 mode_t mode = (from_stat.st_mode & 01777) | S_IRUSR | S_IXUSR | S_IWUSR; in DoCopyDirectory() 257 if (!S_ISREG(from_stat.st_mode)) { in DoCopyDirectory() 276 if (!S_ISREG(stat_at_use.st_mode)) { in DoCopyDirectory() 298 int mode = 0600 | (stat_at_use.st_mode & 0177); in DoCopyDirectory() 357 if (!S_ISDIR(file_info.st_mode)) in DeleteFile() [all …]
|
/aosp_15_r20/build/make/tools/libhost/ |
H A D | CopyFile.c | 183 if (chmod(dst, pSrcStat->st_mode & ~(S_IFMT)) != 0) { in setPermissions() 185 dst, pSrcStat->st_mode & ~(S_IFMT), strerror(errno))); in setPermissions() 217 if (statResult == 0 && !S_ISREG(dstStat.st_mode)) { in copyRegular() 373 if (statResult == 0 && !S_ISREG(dstStat.st_mode) in copySymlink() 374 && !S_ISLNK(dstStat.st_mode) in copySymlink() 452 if (statResult == 0 && !S_ISDIR(dstStat.st_mode)) { in copyDirectory() 576 if (S_ISDIR(srcStat.st_mode)) { in copyFileRecursive() 583 } else if (S_ISLNK(srcStat.st_mode)) { in copyFileRecursive() 586 } else if (S_ISREG(srcStat.st_mode)) { in copyFileRecursive() 590 src, srcStat.st_mode); in copyFileRecursive()
|