Home
last modified time | relevance | path

Searched refs:st_mode (Results 1 – 25 of 515) sorted by relevance

12345678910>>...21

/external/chromium-trace/catapult/telemetry/third_party/pyfakefs/pyfakefs/
Dfake_filesystem_shutil.py85 if stat.S_ISDIR(self.filesystem.GetObject(dst).st_mode):
90 dst_object.st_mode = ((dst_object.st_mode & ~_PERM_ALL) |
91 (src_object.st_mode & _PERM_ALL))
105 if not src_file_object.st_mode & _PERM_READ:
107 if stat.S_ISDIR(src_file_object.st_mode):
115 if not dst_dir_object.st_mode & _PERM_WRITE:
127 if stat.S_ISDIR(dst_file_object.st_mode):
129 if not dst_file_object.st_mode & _PERM_WRITE:
145 dst_object.st_mode = ((dst_object.st_mode & ~_PERM_ALL) |
146 (src_object.st_mode & _PERM_ALL))
[all …]
Dfake_filesystem_shutil_test.py50 src_obj.st_mode = ((src_obj.st_mode & ~0o7777) | 0o750)
56 self.assertEqual(src_obj.st_mode, dst_obj.st_mode)
64 src_obj.st_mode = ((src_obj.st_mode & ~0o7777) | 0o750)
71 self.assertEqual(src_obj.st_mode, dst_obj.st_mode)
78 src_obj.st_mode = ((src_obj.st_mode & ~0o7777) | 0o750)
86 self.assertEqual(src_obj.st_mode, dst_obj.st_mode)
96 src_obj.st_mode = ((src_obj.st_mode & ~0o7777) | 0o750)
106 self.assertEqual(src_obj.st_mode, dst_obj.st_mode)
118 src_obj.st_mode = ((src_obj.st_mode & ~0o7777) | 0o750)
129 self.assertEqual(src_obj.st_mode, dst_obj.st_mode)
[all …]
Dfake_filesystem.py165 def __init__(self, name, st_mode=stat.S_IFREG | PERM_DEF_FILE, argument
178 self.st_mode = st_mode
275 return '%s(%o)' % (self.name, self.st_mode)
712 if stat.S_ISLNK(current_dir.st_mode):
904 def CreateFile(self, file_path, st_mode=stat.S_IFREG | PERM_DEF_FILE, argument
940 st_mode &= ~self.umask
941 file_object = FakeFile(new_file, st_mode, contents)
969 return self.CreateFile(resolved_file_path, st_mode=stat.S_IFLNK | PERM_DEF,
1053 return stat.S_IFMT(obj.st_mode) == st_flag
1090 return stat.S_IFMT(link_obj.st_mode) == stat.S_IFLNK
[all …]
/external/toybox/toys/other/
Dlsattr.c85 if(!S_ISREG(sb->st_mode) && !S_ISDIR(sb->st_mode)) { in ext2_getflag()
98 if (!stat(path, &sb) && !S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) { in print_file_attr()
150 if (S_ISDIR(root->st.st_mode) && !root->parent) in retell_dir()
157 if (S_ISDIR(root->st.st_mode) && (toys.optflags & FLAG_R) in retell_dir()
176 else if (S_ISDIR(sb.st_mode) && !(toys.optflags & FLAG_d)) in lsattr_main()
195 if (!S_ISREG(sb->st_mode) && !S_ISDIR(sb->st_mode)) { in ext2_setflag()
264 if ((S_ISLNK(root->st.st_mode) && chattr.recursive) in update_attr()
265 || (!S_ISREG(root->st.st_mode) && !S_ISLNK(root->st.st_mode) in update_attr()
266 && !S_ISDIR(root->st.st_mode))) in update_attr()
287 if (!S_ISDIR(root->st.st_mode)) fval &= ~FS_DIRSYNC_FL; in update_attr()
[all …]
/external/toybox/toys/pending/
Dtest.c65 nolink = !S_ISLNK(st.st_mode); in test_main()
68 if (id == 0) toys.exitval = !S_ISBLK(st.st_mode); // b in test_main()
69 else if (id == 1) toys.exitval = !S_ISCHR(st.st_mode); // c in test_main()
70 else if (id == 2) toys.exitval = !S_ISDIR(st.st_mode); // d in test_main()
72 else if (id == 4) toys.exitval = !S_ISREG(st.st_mode); // f in test_main()
73 else if (id == 5) toys.exitval = !(st.st_mode & S_ISGID); // g in test_main()
75 else if (id == 8) toys.exitval = !S_ISFIFO(st.st_mode); // p in test_main()
76 else if (id == 9) toys.exitval = !S_ISSOCK(st.st_mode); // S in test_main()
78 else toys.exitval = !(st.st_mode & S_ISUID); // u in test_main()
Ddiff.c489 if (S_ISDIR(node->st.st_mode) && !node->parent) { //add root dirs. in list_dir()
494 if (S_ISDIR(node->st.st_mode) && (toys.optflags & FLAG_r)) { in list_dir()
503 return S_ISDIR(node->st.st_mode) ? 0 : (DIRTREE_RECURSE|DIRTREE_SYMFOLLOW); in list_dir()
679 if (S_ISDIR(st[0].st_mode) && S_ISDIR(st[1].st_mode)) in create_empty_entry()
681 else if (!S_ISREG(st[0].st_mode) && !S_ISDIR(st[0].st_mode)) in create_empty_entry()
684 else if (!S_ISREG(st[1].st_mode) && !S_ISDIR(st[1].st_mode)) in create_empty_entry()
687 else if (S_ISDIR(st[0].st_mode) != S_ISDIR(st[1].st_mode)) { in create_empty_entry()
688 if (S_ISDIR(st[0].st_mode)) in create_empty_entry()
789 && (S_ISDIR(st[0].st_mode) || S_ISDIR(st[1].st_mode))) in diff_main()
798 if (S_ISDIR(st[0].st_mode) && S_ISDIR(st[1].st_mode)) { in diff_main()
[all …]
/external/autotest/client/site_tests/login_UserPolicyKeys/
Dlogin_UserPolicyKeys.py23 return info.st_mode & stat.S_IRUSR
25 return info.st_mode & stat.S_IRGRP
26 return info.st_mode & stat.S_IROTH
32 return info.st_mode & stat.S_IXUSR
34 return info.st_mode & stat.S_IXGRP
35 return info.st_mode & stat.S_IXOTH
46 if not stat.S_ISREG(info.st_mode):
50 (key_file, oct(info.st_mode)))
58 mode = stat.S_IMODE(info.st_mode)
61 (current, oct(info.st_mode)))
/external/toybox/toys/posix/
Dcp.c137 if (S_ISDIR(try->st.st_mode) && try->again) { in cp_node()
143 if (S_ISLNK(try->st.st_mode) && (flags & FLAG_d)) flags |= FLAG_r; in cp_node()
160 if (!faccessat(cfd, catch, F_OK, 0) && !S_ISDIR(cst.st_mode)) { in cp_node()
163 if (S_ISDIR(try->st.st_mode)) { in cp_node()
192 if (S_ISDIR(try->st.st_mode)) { in cp_node()
208 if (!mkdirat(cfd, catch, try->st.st_mode | 0200) || errno == EEXIST) in cp_node()
210 if (!fstat(try->extra, &st2) && S_ISDIR(st2.st_mode)) in cp_node()
247 } else if (!S_ISREG(try->st.st_mode) in cp_node()
253 if (S_ISLNK(try->st.st_mode) in cp_node()
256 : !mknodat(cfd, catch, try->st.st_mode, try->st.st_rdev)) in cp_node()
[all …]
Dfile.c302 if (fd || S_ISREG(sb.st_mode)) { in file_main()
309 } else if (S_ISFIFO(sb.st_mode)) what = "fifo"; in file_main()
310 else if (S_ISBLK(sb.st_mode)) what = "block special"; in file_main()
311 else if (S_ISCHR(sb.st_mode)) what = "character special"; in file_main()
312 else if (S_ISDIR(sb.st_mode)) what = "directory"; in file_main()
313 else if (S_ISSOCK(sb.st_mode)) what = "socket"; in file_main()
314 else if (S_ISLNK(sb.st_mode)) what = "symbolic link"; in file_main()
Dcpio.c198 if (fd != -1 && !fstat(fd, &st) && (st.st_mode&S_IFMT) == (mode&S_IFMT)) in cpio_main()
234 if (lstat(name, &st) || (S_ISREG(st.st_mode) in cpio_main()
241 if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode)) st.st_size = 0; in cpio_main()
246 (int)st.st_ino, st.st_mode, st.st_uid, st.st_gid, (int)st.st_nlink, in cpio_main()
259 if (S_ISLNK(st.st_mode)) { in cpio_main()
/external/ltp/testcases/kernel/syscalls/dup/
Ddup07.c70 if (retbuf.st_mode != dupbuf.st_mode) { in main()
92 if (retbuf.st_mode != dupbuf.st_mode) { in main()
115 if (retbuf.st_mode != dupbuf.st_mode) { in main()
/external/vboot_reference/futility/
Dfile_type.c94 if (S_ISREG(sb.st_mode) || S_ISBLK(sb.st_mode)) { in futil_file_type()
108 } else if (S_ISDIR(sb.st_mode)) { in futil_file_type()
110 } else if (S_ISCHR(sb.st_mode)) { in futil_file_type()
112 } else if (S_ISFIFO(sb.st_mode)) { in futil_file_type()
114 } else if (S_ISSOCK(sb.st_mode)) { in futil_file_type()
/external/syslinux/com32/rosh/
Drosh.c578 int rosh_ls_de_size_mode(const char *filestr, struct dirent *de, mode_t * st_mode) in rosh_ls_de_size_mode() argument
611 *st_mode = fdstat.st_mode; in rosh_ls_de_size_mode()
738 void rosh_st_mode_am2str(mode_t st_mode, char *st_mode_str) in rosh_st_mode_am2str() argument
740 st_mode_str[0] = ((st_mode & S_IROTH) ? 'r' : '-'); in rosh_st_mode_am2str()
741 st_mode_str[1] = ((st_mode & S_IWOTH) ? 'w' : '-'); in rosh_st_mode_am2str()
742 st_mode_str[2] = ((st_mode & S_IXOTH) ? 'x' : '-'); in rosh_st_mode_am2str()
749 void rosh_st_mode2str(mode_t st_mode, char *st_mode_str) in rosh_st_mode2str() argument
751 st_mode_str[0] = rosh_d_type2char_lspre(IFTODT(st_mode)); in rosh_st_mode2str()
752 rosh_st_mode_am2str((st_mode & S_IRWXU) >> 6, st_mode_str + 1); in rosh_st_mode2str()
753 rosh_st_mode_am2str((st_mode & S_IRWXG) >> 3, st_mode_str + 4); in rosh_st_mode2str()
[all …]
/external/ipsec-tools/src/racoon/
Dsafefile.c73 switch (s.st_mode & S_IFMT) {
79 (s.st_mode & S_IFMT));
85 if ((s.st_mode & S_IRWXG) != 0 || (s.st_mode & S_IRWXO) != 0) {
/external/kernel-headers/original/uapi/asm-x86/asm/
Dstat.h12 unsigned short st_mode; member
47 unsigned int st_mode; member
87 unsigned int st_mode; member
119 unsigned short st_mode; member
/external/syslinux/linux/
Dsyslinux.c117 if (!S_ISBLK(st.st_mode)) { in do_mount()
167 if (!S_ISBLK(st.st_mode)) { in do_mount()
308 if (!S_ISBLK(st.st_mode) && !S_ISREG(st.st_mode) && !S_ISCHR(st.st_mode)) { in main()
312 if (opt.offset && S_ISBLK(st.st_mode)) { in main()
348 if (stat(".", &dst) || !S_ISDIR(dst.st_mode) || in main()
349 (dst.st_mode & TMP_MODE) != TMP_MODE) { in main()
369 if (lstat(mntname, &dst) || dst.st_mode != (S_IFDIR | 0000) || in main()
/external/libchrome/base/files/
Dfile_util_posix.cc106 if (S_ISLNK(stat_info.st_mode)) { in VerifySpecificPathControlledByUser()
118 if ((stat_info.st_mode & S_IWGRP) && in VerifySpecificPathControlledByUser()
125 if (stat_info.st_mode & S_IWOTH) { in VerifySpecificPathControlledByUser()
213 if (!S_ISDIR(file_info.st_mode)) in DeleteFile()
302 S_ISDIR(to_path_stat.st_mode)) { in CopyDirectory()
311 DCHECK(recursive || S_ISDIR(from_stat.st_mode)); in CopyDirectory()
325 if (S_ISDIR(from_stat.st_mode)) { in CopyDirectory()
327 (from_stat.st_mode & 01777) | S_IRUSR | S_IXUSR | S_IWUSR) != in CopyDirectory()
334 } else if (S_ISREG(from_stat.st_mode)) { in CopyDirectory()
386 return S_ISDIR(file_info.st_mode); in DirectoryExists()
[all …]
/external/syslinux/com32/lib/sys/
Dfstat.c51 buf->st_mode = S_IFSOCK | 0444; in fstat()
54 buf->st_mode = S_IFREG | 0444; in fstat()
58 buf->st_mode = S_IFCHR | 0666; in fstat()
/external/squashfs-tools/squashfs-tools/
Dandroid.c49 mode_t stat_file_type_mask = stat->st_mode & S_IFMT; in android_fs_config()
52 fs_config_func(path, S_ISDIR(stat->st_mode), target_out_path, in android_fs_config()
56 stat->st_mode = mode; in android_fs_config()
58 stat->st_mode |= stat_file_type_mask; in android_fs_config()
Daction.c851 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 …]
/external/kernel-headers/original/uapi/asm-arm/asm/
Dstat.h7 unsigned short st_mode; member
28 unsigned short st_mode; member
62 unsigned int st_mode; member
/external/chromium-trace/catapult/dependency_manager/dependency_manager/
Ddependency_manager_util_unittest.py87 stat.S_IRUSR & stat.S_IMODE(os.stat(read_only_path).st_mode))
89 stat.S_IRUSR & stat.S_IMODE(os.stat(sub_read_only_path).st_mode))
91 stat.S_IRUSR & stat.S_IMODE(os.stat(writable_path).st_mode))
93 stat.S_IWUSR & stat.S_IMODE(os.stat(writable_path).st_mode))
95 stat.S_IRUSR & stat.S_IMODE(os.stat(sub_writable_path).st_mode))
97 stat.S_IWUSR & stat.S_IMODE(os.stat(sub_writable_path).st_mode))
101 stat.S_IRWXU & stat.S_IMODE(os.stat(executable_path).st_mode))
104 stat.S_IRWXU & stat.S_IMODE(os.stat(sub_executable_path).st_mode))
/external/ltp/testcases/kernel/syscalls/creat/
Dcreat08.c157 if (buf.st_mode & S_ISGID) { in main()
196 if (!(buf.st_mode & S_ISGID)) { in main()
254 if (buf.st_mode & S_ISGID) { in main()
282 if (!(buf.st_mode & S_ISGID)) { in main()
326 if (buf.st_mode & S_ISGID) { in main()
363 if (!(buf.st_mode & S_ISGID)) { in main()
404 if (!(buf.st_mode & S_ISGID)) { in main()
/external/ltp/testcases/kernel/syscalls/open/
Dopen10.c143 if (buf.st_mode & S_ISGID) { in main()
181 if (!(buf.st_mode & S_ISGID)) { in main()
237 if (buf.st_mode & S_ISGID) { in main()
266 if (!(buf.st_mode & S_ISGID)) { in main()
312 if (buf.st_mode & S_ISGID) { in main()
349 if (!(buf.st_mode & S_ISGID)) { in main()
395 if (!(buf.st_mode & S_ISGID)) { in main()
/external/kernel-headers/original/uapi/asm-mips/asm/
Dstat.h22 mode_t st_mode; member
57 mode_t st_mode; member
98 mode_t st_mode; member

12345678910>>...21