Home | History | Annotate | Download | only in brillo

Lines Matching full:base

10 #include <base/files/file_path.h>
11 #include <base/files/file_util.h>
12 #include <base/files/scoped_file.h>
13 #include <base/logging.h>
14 #include <base/posix/eintr_wrapper.h>
25 // Verify that base file permission enums are compatible with S_Ixxx. If these
27 // away from using base permission enums and add a note to the function comments
28 // indicating that base enums can not be used.
29 static_assert(base::FILE_PERMISSION_READ_BY_USER == S_IRUSR,
30 "base file permissions don't match unistd.h permissions");
31 static_assert(base::FILE_PERMISSION_WRITE_BY_USER == S_IWUSR,
32 "base file permissions don't match unistd.h permissions");
33 static_assert(base::FILE_PERMISSION_EXECUTE_BY_USER == S_IXUSR,
34 "base file permissions don't match unistd.h permissions");
35 static_assert(base::FILE_PERMISSION_READ_BY_GROUP == S_IRGRP,
36 "base file permissions don't match unistd.h permissions");
37 static_assert(base::FILE_PERMISSION_WRITE_BY_GROUP == S_IWGRP,
38 "base file permissions don't match unistd.h permissions");
39 static_assert(base::FILE_PERMISSION_EXECUTE_BY_GROUP == S_IXGRP,
40 "base file permissions don't match unistd.h permissions");
41 static_assert(base::FILE_PERMISSION_READ_BY_OTHERS == S_IROTH,
42 "base file permissions don't match unistd.h permissions");
43 static_assert(base::FILE_PERMISSION_WRITE_BY_OTHERS == S_IWOTH,
44 "base file permissions don't match unistd.h permissions");
45 static_assert(base::FILE_PERMISSION_EXECUTE_BY_OTHERS == S_IXOTH,
46 "base file permissions don't match unistd.h permissions");
57 RegularFileOrDeleteResult RegularFileOrDelete(const base::FilePath& path,
62 base::ScopedFD scoped_fd(HANDLE_EINTR(openat(
79 if (!base::DeleteFile(path, true)) {
94 bool TouchFileInternal(const base::FilePath& path,
97 base::ScopedFD* fd_out) {
108 // base::CreateDirectory() returns true if the directory already existed.
109 if (!base::CreateDirectory(path.DirName())) {
115 base::ScopedFD scoped_fd(
133 bool TouchFile(const base::FilePath& path,
143 base::ScopedFD scoped_fd;
152 base::DeleteFile(path, false);
159 bool TouchFile(const base::FilePath& path) {