Home
last modified time | relevance | path

Searched refs:filesystem (Results 1 – 18 of 18) sorted by relevance

/art/artd/
Dfile_utils_test.cc105 EXPECT_FALSE(std::filesystem::exists((*new_file)->FinalPath())); in TEST_F()
106 EXPECT_TRUE(std::filesystem::exists((*new_file)->TempPath())); in TEST_F()
122 EXPECT_FALSE(std::filesystem::exists(path)); in TEST_F()
123 EXPECT_FALSE(std::filesystem::exists(new_file->TempPath())); in TEST_F()
136 EXPECT_FALSE(std::filesystem::exists(path)); in TEST_F()
137 EXPECT_FALSE(std::filesystem::exists(temp_path)); in TEST_F()
150 EXPECT_TRUE(std::filesystem::exists(path)); in TEST_F()
151 EXPECT_FALSE(std::filesystem::exists(temp_path)); in TEST_F()
171 EXPECT_FALSE(std::filesystem::exists(new_file_1->TempPath())); in TEST_F()
172 EXPECT_FALSE(std::filesystem::exists(new_file_2->TempPath())); in TEST_F()
[all …]
Dfile_utils.cc52 std::filesystem::remove(path, ec); in UnlinkIfExists()
80 std::filesystem::rename(temp_path_, final_path_, ec); in CommitOrAbandon()
160 std::filesystem::rename(temp_path, original_path, ec); in MoveAllOrAbandon()
183 std::filesystem::file_status status = std::filesystem::status(original_path, ec); in MoveAllOrAbandon()
184 if (!std::filesystem::status_known(status)) { in MoveAllOrAbandon()
187 if (std::filesystem::is_directory(status)) { in MoveAllOrAbandon()
190 if (std::filesystem::exists(status)) { in MoveAllOrAbandon()
198 std::filesystem::rename(original_path, temp_path, ec); in MoveAllOrAbandon()
214 std::filesystem::rename(src_path, dst_path, ec); in MoveAllOrAbandon()
Dartd_test.cc150 EXPECT_EQ((std::filesystem::status(path).permissions() & std::filesystem::perms::others_read) != in CheckOtherReadable()
151 std::filesystem::perms::none, in CheckOtherReadable()
350 std::filesystem::create_directories(art_root_); in SetUp()
355 std::filesystem::create_directories(android_data_); in SetUp()
360 std::filesystem::create_directories(android_expand_); in SetUp()
403 std::filesystem::create_directories( in SetUp()
404 std::filesystem::path(OR_FATAL(BuildFinalProfilePath(tmp_profile_path_))).parent_path()); in SetUp()
495 std::filesystem::path path(filename); in CreateFile()
496 std::filesystem::create_directories(path.parent_path()); in CreateFile()
503 std::filesystem::path path(filename); in CreateZipWithSingleEntry()
[all …]
Dartd.cc153 int64_t size = std::filesystem::file_size(path, ec); in GetSize()
166 std::filesystem::remove(path, ec); in DeleteFile()
233 bool created = std::filesystem::create_directory(path, ec); in CreateDir()
246 std::filesystem::remove(path, ec); in PrepareArtifactsDir()
265 std::filesystem::path oat_path( in PrepareArtifactsDirs()
267 std::filesystem::path isa_dir = oat_path.parent_path(); in PrepareArtifactsDirs()
268 std::filesystem::path oat_dir = isa_dir.parent_path(); in PrepareArtifactsDirs()
279 std::filesystem::file_status status = std::filesystem::status(file, ec); in GetFileVisibility()
280 if (!std::filesystem::status_known(status)) { in GetFileVisibility()
283 if (!std::filesystem::exists(status)) { in GetFileVisibility()
[all …]
Dpath_utils.cc228 std::filesystem::path dex_path(secondary_ref_profile_path.dexPath); in BuildSecondaryRefProfilePath()
238 std::filesystem::path dex_path(secondary_cur_profile_path.dexPath); in BuildSecondaryCurProfilePath()
/art/libarttools/
Dtools.cc77 bool PartialMatch(const std::filesystem::path& pattern, const std::filesystem::path& path_prefix) { in PartialMatch()
78 for (std::filesystem::path::const_iterator pattern_it = pattern.begin(), in PartialMatch()
97 bool FullMatchRecursive(const std::filesystem::path& pattern, in FullMatchRecursive()
98 std::filesystem::path::const_iterator pattern_it, in FullMatchRecursive()
99 const std::filesystem::path& path, in FullMatchRecursive()
100 std::filesystem::path::const_iterator path_it, in FullMatchRecursive()
110 std::filesystem::path::const_iterator next_pattern_it = pattern_it; in FullMatchRecursive()
125 bool FullMatch(const std::filesystem::path& pattern, const std::filesystem::path& path) { in FullMatch()
129 void MatchGlobRecursive(const std::vector<std::filesystem::path>& patterns, in MatchGlobRecursive()
130 const std::filesystem::path& root_dir, in MatchGlobRecursive()
[all …]
Dtools_test.cc44 std::filesystem::path path(filename); in CreateFile()
45 std::filesystem::create_directories(path.parent_path()); in CreateFile()
90 std::filesystem::create_directory_symlink(scratch_path_ + "/abc/aaa/bbb/pqr", in TEST_F()
94 std::filesystem::create_directory(scratch_path_ + "/abc/def/ghi/000.txt"); in TEST_F()
185 std::filesystem::create_directories(related_dir_); in SetUp()
186 std::filesystem::create_directories(unrelated_dir_); in SetUp()
187 std::filesystem::copy(sleep_bin, related_dir_ + "/sleep"); in SetUp()
188 std::filesystem::copy(sleep_bin, unrelated_dir_ + "/sleep"); in SetUp()
Dart_exec.cc163 for (const std::filesystem::directory_entry& dir_entry : in CloseFds()
164 std::filesystem::directory_iterator("/proc/self/fd", ec)) { in CloseFds()
178 if (std::filesystem::exists(ART_FORMAT("/proc/self/fd/{}", fd))) { in CloseFds()
/art/libartbase/base/
Dcommon_art_test.cc75 std::filesystem::remove_all(path_); in ~ScratchDir()
161 std::filesystem::perms old_perms = std::filesystem::status(path).permissions(); in ScopedInaccessible()
162 std::filesystem::permissions(path, std::filesystem::perms::none); in ScopedInaccessible()
163 return android::base::make_scope_guard([=]() { std::filesystem::permissions(path, old_perms); }); in ScopedInaccessible()
174 std::filesystem::path path(argv.substr(0, argv.find('\0'))); in GetAndroidBuildTop()
175 path = std::filesystem::absolute(path); in GetAndroidBuildTop()
179 if (path.filename() == std::filesystem::path("linux-x86")) { in GetAndroidBuildTop()
185 if (path.filename() == std::filesystem::path("testcases") || in GetAndroidBuildTop()
196 android_build_top = std::filesystem::path(android_build_top).string(); in GetAndroidBuildTop()
199 if (std::filesystem::weakly_canonical(android_build_top).string() != in GetAndroidBuildTop()
[all …]
/art/dexopt_chroot_setup/
Ddexopt_chroot_setup_test.cc73 if (std::filesystem::exists(DexoptChrootSetup::CHROOT_DIR)) { in SetUp()
154 EXPECT_FALSE(std::filesystem::is_empty(PathInChroot(dir))); in TEST_F()
157 EXPECT_TRUE(std::filesystem::is_directory(PathInChroot("/mnt/artd_tmp"))); in TEST_F()
183 EXPECT_FALSE(std::filesystem::exists(DexoptChrootSetup::CHROOT_DIR)); in TEST_F()
192 EXPECT_FALSE(std::filesystem::exists(DexoptChrootSetup::CHROOT_DIR)); in TEST_F()
Ddexopt_chroot_setup.cc118 std::filesystem::create_directory(path, ec); in CreateDir()
285 for (const std::string& filesystem : supported_filesystems->value()) { in Mount() local
288 filesystem.c_str(), in Mount()
293 "Mounted '{}' at '{}' with type '{}'", block_device, target, filesystem); in Mount()
300 error_msgs.push_back(ART_FORMAT("Tried '{}': {}", filesystem, strerror(errno))); in Mount()
536 std::uintmax_t removed = std::filesystem::remove_all(CHROOT_DIR, ec); in TearDownChroot()
548 std::filesystem::remove_all(*kBindMountTmpDir, ec); in TearDownChroot()
553 std::filesystem::remove(*kOtaSlotFile, ec); in TearDownChroot()
565 std::filesystem::remove(*kSnapshotMappedFile, ec); in TearDownChroot()
/art/libdexfile/dex/
Dfuzzer_corpus_test.cc75 ASSERT_TRUE(std::filesystem::is_directory(folder)) << folder << " is not a folder"; in TEST_F()
76 ASSERT_FALSE(std::filesystem::is_empty(folder)) << " No files found for directory " << folder; in TEST_F()
/art/libartpalette/apex/
Dpalette_test.cc133 if (!std::filesystem::exists("/sys/fs/cgroup/cgroup.controllers")) { in TEST_F()
156 if (!std::filesystem::exists("/sys/fs/cgroup/cgroup.controllers")) { in TEST_F()
/art/libartservice/service/native/
Dservice.cc49 std::filesystem::path path(path_str); in ValidateAbsoluteNormalPath()
100 std::string context_path = std::filesystem::path(dex_dir).append(context_element); in ValidateClassLoaderContext()
/art/runtime/
Dhidden_api_test.cc699 std::filesystem::create_directory(GetAndroidRoot() + "/system_ext"); in TEST_F()
707 std::filesystem::create_directory(GetAndroidRoot() + "/framework"); in TEST_F()
715 std::filesystem::create_directory(android_system_ext_ + "/framework"); in TEST_F()
724 std::filesystem::create_directory(GetAndroidRoot() + "/system_ext"); in TEST_F()
725 std::filesystem::create_directory(GetAndroidRoot() + "/system_ext/framework"); in TEST_F()
758 std::filesystem::create_directory(GetAndroidRoot() + "/system_ext"); in TEST_F()
768 std::filesystem::create_directory(GetAndroidRoot() + "/framework"); in TEST_F()
777 std::filesystem::create_directory(android_system_ext_ + "/framework"); in TEST_F()
787 std::filesystem::create_directory(GetAndroidRoot() + "/system_ext"); in TEST_F()
788 std::filesystem::create_directory(GetAndroidRoot() + "/system_ext/framework"); in TEST_F()
Dexec_utils_test.cc58 } else if (std::filesystem::exists("/usr/bin/" + name)) { in GetBin()
Dclass_loader_context_test.cc1682 std::filesystem::create_directory_symlink(scratch_path_, scratch_path_ + "/bar"); in TEST_F()
/art/odrefresh/
Dodrefresh.cc737 if (std::filesystem::exists(staging_dir, ec)) { in CreateStagingDirectory()
738 if (std::filesystem::remove_all(staging_dir, ec) < 0) { in CreateStagingDirectory()
1537 std::vector<std::filesystem::directory_entry> entries; in CleanupArtifactDirectory()
1539 for (const auto& entry : std::filesystem::recursive_directory_iterator(artifact_dir, ec)) { in CleanupArtifactDirectory()
1550 for (const std::filesystem::directory_entry& entry : entries) { in CleanupArtifactDirectory()
1580 std::vector<std::filesystem::directory_entry> entries; in RefreshExistingArtifacts()
1582 for (const auto& entry : std::filesystem::recursive_directory_iterator(artifact_dir, ec)) { in RefreshExistingArtifacts()
1591 for (const std::filesystem::directory_entry& entry : entries) { in RefreshExistingArtifacts()