Home
last modified time | relevance | path

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

12345678910>>...15

/external/chromium-trace/catapult/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.py182 def __init__(self, name, st_mode=stat.S_IFREG | PERM_DEF_FILE, argument
195 self.st_mode = st_mode
293 return '%s(%o)' % (self.name, self.st_mode)
730 if stat.S_ISLNK(current_dir.st_mode):
922 def CreateFile(self, file_path, st_mode=stat.S_IFREG | PERM_DEF_FILE, argument
958 st_mode &= ~self.umask
959 file_object = FakeFile(new_file, st_mode, contents)
987 return self.CreateFile(resolved_file_path, st_mode=stat.S_IFLNK | PERM_DEF,
1071 return stat.S_IFMT(obj.st_mode) == st_flag
1108 return stat.S_IFMT(link_obj.st_mode) == stat.S_IFLNK
[all …]
/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.c82 if(!S_ISREG(sb->st_mode) && !S_ISDIR(sb->st_mode)) { in ext2_getflag()
95 if (!stat(path, &sb) && !S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) { in print_file_attr()
147 if (S_ISDIR(root->st.st_mode) && !root->parent) in retell_dir()
154 if (S_ISDIR(root->st.st_mode) && (toys.optflags & FLAG_R) in retell_dir()
173 else if (S_ISDIR(sb.st_mode) && !(toys.optflags & FLAG_d)) in lsattr_main()
192 if (!S_ISREG(sb->st_mode) && !S_ISDIR(sb->st_mode)) { in ext2_setflag()
261 if ((S_ISLNK(root->st.st_mode) && chattr.recursive) in update_attr()
262 || (!S_ISREG(root->st.st_mode) && !S_ISLNK(root->st.st_mode) in update_attr()
263 && !S_ISDIR(root->st.st_mode))) in update_attr()
284 if (!S_ISDIR(root->st.st_mode)) fval &= ~FS_DIRSYNC_FL; in update_attr()
[all …]
Dstat.c72 if (type == 'a') out('o', stat->st_mode&~S_IFMT); in print_stat()
76 mode_to_string(stat->st_mode, str); in print_stat()
82 else if (type == 'f') out('x', stat->st_mode); in print_stat()
86 int i, filetype = stat->st_mode & S_IFMT; in print_stat()
97 if (S_ISLNK(stat->st_mode)) in print_stat()
/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()
Dfile.c206 if (S_ISREG(sb.st_mode)) { in do_file()
212 } else if (S_ISBLK(sb.st_mode)) what = "block special"; in do_file()
213 else if (S_ISCHR(sb.st_mode)) what = "character special"; in do_file()
214 else if (S_ISDIR(sb.st_mode)) what = "directory"; in do_file()
215 else if (S_ISFIFO(sb.st_mode)) what = "fifo"; in do_file()
216 else if (S_ISSOCK(sb.st_mode)) what = "socket"; in do_file()
217 else if (S_ISLNK(sb.st_mode)) what = "symbolic link"; in do_file()
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.c154 if (S_ISDIR(try->st.st_mode) && try->again) { in cp_node()
160 if (S_ISLNK(try->st.st_mode) && (flags & FLAG_d)) flags |= FLAG_r; in cp_node()
177 if (!faccessat(cfd, catch, F_OK, 0) && !S_ISDIR(cst.st_mode)) { in cp_node()
180 if (S_ISDIR(try->st.st_mode)) { in cp_node()
209 if (S_ISDIR(try->st.st_mode)) { in cp_node()
225 if (!mkdirat(cfd, catch, try->st.st_mode | 0200) || errno == EEXIST) in cp_node()
227 if (!fstat(try->extra, &st2) && S_ISDIR(st2.st_mode)) in cp_node()
264 } else if (!S_ISREG(try->st.st_mode) in cp_node()
270 if (S_ISLNK(try->st.st_mode) in cp_node()
273 : !mknodat(cfd, catch, try->st.st_mode, try->st.st_rdev)) in cp_node()
[all …]
Dcpio.c197 if (fd != -1 && !fstat(fd, &st) && (st.st_mode&S_IFMT) == (mode&S_IFMT)) in cpio_main()
233 if (lstat(name, &st) || (S_ISREG(st.st_mode) in cpio_main()
240 if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode)) st.st_size = 0; in cpio_main()
245 (int)st.st_ino, st.st_mode, st.st_uid, st.st_gid, (int)st.st_nlink, in cpio_main()
257 if (S_ISLNK(st.st_mode)) { in cpio_main()
Dln.c41 || !S_ISDIR(buf.st_mode)) in ln_main()
44 buf.st_mode = 0; in ln_main()
51 if (S_ISDIR(buf.st_mode)) new = xmprintf("%s/%s", dest, basename(try)); in ln_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/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/libchrome/base/files/
Dfile_util_posix.cc105 if (S_ISLNK(stat_info.st_mode)) { in VerifySpecificPathControlledByUser()
117 if ((stat_info.st_mode & S_IWGRP) && in VerifySpecificPathControlledByUser()
124 if (stat_info.st_mode & S_IWOTH) { in VerifySpecificPathControlledByUser()
212 if (!S_ISDIR(file_info.st_mode)) in DeleteFile()
301 S_ISDIR(to_path_stat.st_mode)) { in CopyDirectory()
310 DCHECK(recursive || S_ISDIR(from_stat.st_mode)); in CopyDirectory()
324 if (S_ISDIR(from_stat.st_mode)) { in CopyDirectory()
326 (from_stat.st_mode & 01777) | S_IRUSR | S_IXUSR | S_IWUSR) != in CopyDirectory()
333 } else if (S_ISREG(from_stat.st_mode)) { in CopyDirectory()
385 return S_ISDIR(file_info.st_mode); in DirectoryExists()
[all …]
/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/squashfs-tools/squashfs-tools/
Dandroid.c49 mode_t stat_file_type_mask = stat->st_mode & S_IFMT; in android_fs_config()
51 fs_config_func(path, S_ISDIR(stat->st_mode), target_out_path, in android_fs_config()
52 &stat->st_uid, &stat->st_gid, &stat->st_mode, capabilities); in android_fs_config()
53 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/strace/
Dfile.c104 unsigned short st_mode; member
126 unsigned int st_mode; member
148 unsigned short st_mode; member
189 unsigned st_mode; member
284 unsigned int st_mode; member
410 newbuf->st_mode = oldbuf->st_mode; in convertoldstat()
/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
/external/strace/tests/
Dxstatx.c168 print_ftype(st->st_mode); in print_stat()
170 print_perms(st->st_mode); in print_stat()
177 switch (st->st_mode & S_IFMT) { in print_stat()
274 STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_mode), in main()
275 sizeof(st[0].st_mode)); in main()

12345678910>>...15