Home
last modified time | relevance | path

Searched refs:file_util (Results 1 – 25 of 350) sorted by relevance

12345678910>>...14

/external/chromium/base/
Dfile_util_unittest.cc115 const file_util::FileEnumerator::FILE_TYPE FILES_AND_DIRECTORIES =
116 static_cast<file_util::FileEnumerator::FILE_TYPE>(
117 file_util::FileEnumerator::FILES |
118 file_util::FileEnumerator::DIRECTORIES);
136 explicit FindResultCollector(file_util::FileEnumerator& enumerator) { in FindResultCollector()
222 file_util::AppendToPath(&result, value.ending); in TEST_F()
227 file_util::AppendToPath(NULL, L"path"); // asserts in debug mode in TEST_F()
289 const std::wstring fext = file_util::GetFileExtensionFromPath(ext.path); in TEST_F()
339 EXPECT_EQ(0, file_util::CountFilesCreatedAfter(temp_dir_.path(), now)); in TEST_F()
347 EXPECT_EQ(1, file_util::CountFilesCreatedAfter(temp_dir_.path(), now)); in TEST_F()
[all …]
Dprocess_linux.cc54 file_util::FileSystemType foreground_type; in SetProcessBackgrounded()
55 file_util::FileSystemType background_type; in SetProcessBackgrounded()
57 file_util::GetFileSystemType(foreground_tasks, &foreground_type) && in SetProcessBackgrounded()
58 file_util::GetFileSystemType(background_tasks, &background_type) && in SetProcessBackgrounded()
59 foreground_type == file_util::FILE_SYSTEM_CGROUP && in SetProcessBackgrounded()
60 background_type == file_util::FILE_SYSTEM_CGROUP; in SetProcessBackgrounded()
66 if (file_util::WriteFile(background_tasks, pid.c_str(), pid.size()) > 0) { in SetProcessBackgrounded()
81 if (file_util::WriteFile(foreground_tasks, pid.c_str(), pid.size()) > 0) { in SetProcessBackgrounded()
Dfile_util_proxy.cc23 if (!file_util::PathExists(src_file_path)) in PerformCommonCheckAndPreparationForMoveAndCopy()
27 if (!file_util::DirectoryExists(dest_file_path.DirName())) in PerformCommonCheckAndPreparationForMoveAndCopy()
35 if (!file_util::PathExists(dest_file_path)) in PerformCommonCheckAndPreparationForMoveAndCopy()
40 bool src_is_directory = file_util::DirectoryExists(src_file_path); in PerformCommonCheckAndPreparationForMoveAndCopy()
41 bool dest_is_directory = file_util::DirectoryExists(dest_file_path); in PerformCommonCheckAndPreparationForMoveAndCopy()
60 if (!file_util::Delete(dest_file_path, false /* recursive */)) { in PerformCommonCheckAndPreparationForMoveAndCopy()
61 if (!file_util::IsDirectoryEmpty(dest_file_path)) in PerformCommonCheckAndPreparationForMoveAndCopy()
140 if (!file_util::DirectoryExists(file_path_.DirName())) { in RunWork()
186 file_util::CreateTemporaryFile(&file_path_); in RunWork()
268 if (!file_util::DirectoryExists(file_path_.DirName())) { in RunWork()
[all …]
Dbase_paths_linux.cc43 if (!file_util::ReadSymbolicLink(FilePath(kSelfExe), &bin_dir)) { in PathProviderPosix()
70 if (file_util::PathExists(path.Append(kThisSourceFile))) { in PathProviderPosix()
82 if (file_util::PathExists(path.Append(kThisSourceFile))) { in PathProviderPosix()
92 if (file_util::PathExists(path.Append(kThisSourceFile))) { in PathProviderPosix()
99 if (file_util::GetCurrentDirectory(&path) && in PathProviderPosix()
100 file_util::PathExists(path.Append(kThisSourceFile))) { in PathProviderPosix()
/external/chromium/net/disk_cache/
Dcache_util_unittest.cc22 ASSERT_TRUE(file_util::CreateDirectory(cache_dir_)); in SetUp()
23 FILE *fp = file_util::OpenFile(file1_, "w"); in SetUp()
25 file_util::CloseFile(fp); in SetUp()
26 fp = file_util::OpenFile(file2_, "w"); in SetUp()
28 file_util::CloseFile(fp); in SetUp()
29 ASSERT_TRUE(file_util::CreateDirectory(dir1_)); in SetUp()
50 EXPECT_TRUE(file_util::PathExists(dest_dir_)); in TEST_F()
51 EXPECT_TRUE(file_util::PathExists(dest_file1_)); in TEST_F()
52 EXPECT_TRUE(file_util::PathExists(dest_file2_)); in TEST_F()
53 EXPECT_TRUE(file_util::PathExists(dest_dir1_)); in TEST_F()
[all …]
Dcache_util_posix.cc21 if (!file_util::CreateDirectory(to_path)) { in MoveCache()
25 file_util::FileEnumerator iter( in MoveCache()
28 static_cast<file_util::FileEnumerator::FILE_TYPE>( in MoveCache()
29 file_util::FileEnumerator::DIRECTORIES | in MoveCache()
30 file_util::FileEnumerator::FILES)); in MoveCache()
33 if (!file_util::Move(name, destination)) { in MoveCache()
40 return file_util::Move(from_path, to_path); in MoveCache()
45 file_util::FileEnumerator iter(path, in DeleteCache()
47 file_util::FileEnumerator::FILES); in DeleteCache()
49 if (!file_util::Delete(file, /* recursive */ false)) { in DeleteCache()
[all …]
/external/chromium/net/base/
Ddirectory_lister.cc98 if (!file_util::DirectoryExists(dir_)) { in ThreadMain()
105 int types = file_util::FileEnumerator::FILES | in ThreadMain()
106 file_util::FileEnumerator::DIRECTORIES; in ThreadMain()
108 types |= file_util::FileEnumerator::INCLUDE_DOT_DOT; in ThreadMain()
110 file_util::FileEnumerator file_enum(dir_, recursive_, in ThreadMain()
111 static_cast<file_util::FileEnumerator::FILE_TYPE>(types)); in ThreadMain()
167 if (file_util::IsDotDot(file_util::FileEnumerator::GetFilename(a.info))) in CompareAlphaDirsFirst()
169 if (file_util::IsDotDot(file_util::FileEnumerator::GetFilename(b.info))) in CompareAlphaDirsFirst()
173 bool a_is_directory = file_util::FileEnumerator::IsDirectory(a.info); in CompareAlphaDirsFirst()
174 bool b_is_directory = file_util::FileEnumerator::IsDirectory(b.info); in CompareAlphaDirsFirst()
[all …]
Ddirectory_lister_unittest.cc39 EXPECT_TRUE(file_util::LocaleAwareCompareFilenames( in CheckRecursiveSort()
51 if (file_util::FileEnumerator::IsDirectory(file_list_[previous]) && in CheckSort()
52 !file_util::FileEnumerator::IsDirectory(file_list_[current])) { in CheckSort()
55 EXPECT_FALSE(file_util::IsDotDot( in CheckSort()
56 file_util::FileEnumerator::GetFilename(file_list_[current]))); in CheckSort()
57 EXPECT_EQ(file_util::FileEnumerator::IsDirectory(file_list_[previous]), in CheckSort()
58 file_util::FileEnumerator::IsDirectory(file_list_[current])); in CheckSort()
59 EXPECT_TRUE(file_util::LocaleAwareCompareFilenames( in CheckSort()
60 file_util::FileEnumerator::GetFilename(file_list_[previous]), in CheckSort()
61 file_util::FileEnumerator::GetFilename(file_list_[current]))); in CheckSort()
[all …]
Dfile_stream_unittest.cc27 file_util::CreateTemporaryFile(&temp_file_path_); in SetUp()
28 file_util::WriteFile(temp_file_path_, kTestData, kTestDataSize); in SetUp()
31 file_util::Delete(temp_file_path_, false); in TearDown()
53 file_util::WriteFile(temp_file_path(), kTestData, kTestDataSize)); in TEST_F()
69 file_util::Delete(temp_file_path(), false); in TEST_F()
80 file_util::ReadFile(temp_file_path(), buffer, kTestDataSize)); in TEST_F()
105 bool ok = file_util::GetFileSize(temp_file_path(), &file_size); in TEST_F()
135 bool ok = file_util::GetFileSize(temp_file_path(), &file_size); in TEST_F()
170 bool ok = file_util::GetFileSize(temp_file_path(), &file_size); in TEST_F()
200 bool ok = file_util::GetFileSize(temp_file_path(), &file_size); in TEST_F()
[all …]
Dupload_data_stream_unittest.cc59 ASSERT_TRUE(file_util::CreateTemporaryFile(&temp_file_path)); in TEST_F()
60 ASSERT_EQ(kTestDataSize, file_util::WriteFile(temp_file_path, in TEST_F()
85 file_util::Delete(temp_file_path, false); in TEST_F()
108 ASSERT_TRUE(file_util::CreateTemporaryFile(&temp_file_path)); in TEST_F()
109 ASSERT_EQ(kTestDataSize, file_util::WriteFile(temp_file_path, in TEST_F()
113 ASSERT_TRUE(file_util::GetFileInfo(temp_file_path, &file_info)); in TEST_F()
123 file_util::Delete(temp_file_path, false); in TEST_F()
/external/chromium/chrome/common/extensions/
Dextension_file_util.cc52 if (!file_util::PathExists(extension_dir)) { in InstallExtension()
53 if (!file_util::CreateDirectory(extension_dir)) in InstallExtension()
63 if (!file_util::PathExists(candidate)) { in InstallExtension()
75 if (!file_util::Move(unpacked_source_dir, version_dir)) in InstallExtension()
86 file_util::Delete(extensions_dir.AppendASCII(id), true); // recursive. in UninstallExtension()
95 if (!file_util::PathExists(manifest_path)) { in LoadExtension()
148 if (!file_util::PathExists(path)) { in ValidateExtension()
165 if (!file_util::PathExists(image_path)) { in ValidateExtension()
206 if (!file_util::PathExists(plugin.path)) { in ValidateExtension()
223 if (!file_util::PathExists(extension->GetResource(*iter).GetFilePath())) { in ValidateExtension()
[all …]
Dextension_file_util_unittest.cc26 ASSERT_TRUE(file_util::CreateDirectory(src)); in TEST()
30 ASSERT_TRUE(file_util::CreateDirectory(all_extensions)); in TEST()
40 ASSERT_TRUE(file_util::DirectoryExists(version_1)); in TEST()
43 ASSERT_FALSE(file_util::DirectoryExists(src)); in TEST()
46 ASSERT_TRUE(file_util::CreateDirectory(src)); in TEST()
54 ASSERT_TRUE(file_util::DirectoryExists(version_2)); in TEST()
62 ASSERT_FALSE(file_util::DirectoryExists(version_1)); in TEST()
63 ASSERT_TRUE(file_util::DirectoryExists(version_2)); in TEST()
67 ASSERT_FALSE(file_util::DirectoryExists(version_2.DirName())); in TEST()
68 ASSERT_TRUE(file_util::DirectoryExists(all_extensions)); in TEST()
[all …]
/external/chromium/base/memory/
Dscoped_temp_dir_unittest.cc12 file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_temp_dir"), in TEST()
16 EXPECT_TRUE(file_util::DirectoryExists(test_path)); in TEST()
22 EXPECT_FALSE(file_util::DirectoryExists(test_path)); in TEST()
28 EXPECT_TRUE(file_util::DirectoryExists(test_path)); in TEST()
34 EXPECT_TRUE(file_util::DirectoryExists(test_path)); in TEST()
41 EXPECT_FALSE(file_util::DirectoryExists(test_path)); in TEST()
52 EXPECT_TRUE(file_util::DirectoryExists(test_path)); in TEST()
54 EXPECT_TRUE(file_util::GetTempDir(&tmp_dir)); in TEST()
57 EXPECT_FALSE(file_util::DirectoryExists(test_path)); in TEST()
63 file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("base_dir"), in TEST()
[all …]
Dscoped_temp_dir.cc24 if (!file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_dir"), in CreateUniqueTempDir()
36 if (!file_util::CreateDirectory(base_path)) in CreateUniqueTempDirUnderPath()
40 if (!file_util::CreateTemporaryDirInDir( in CreateUniqueTempDirUnderPath()
53 if (!file_util::DirectoryExists(path) && in Set()
54 !file_util::CreateDirectory(path)) in Set()
65 bool ret = file_util::Delete(path_, true); in Delete()
83 return !path_.empty() && file_util::DirectoryExists(path_); in IsValid()
/external/chromium/chrome/browser/safe_browsing/
Dsafe_browsing_store_file_unittest.cc24 ASSERT_TRUE(file_util::CreateNewTempDirectory(kFolderPrefix, &temp_dir)); in SetUp()
30 file_util::Delete(filename_, false); in SetUp()
35 file_util::Delete(temp_file, false); in SetUp()
66 EXPECT_FALSE(file_util::PathExists(filename_)); in TEST_F()
67 EXPECT_FALSE(file_util::PathExists(temp_file)); in TEST_F()
71 EXPECT_TRUE(file_util::PathExists(temp_file)); in TEST_F()
77 EXPECT_FALSE(file_util::PathExists(filename_)); in TEST_F()
78 EXPECT_TRUE(file_util::PathExists(temp_file)); in TEST_F()
82 EXPECT_FALSE(file_util::PathExists(filename_)); in TEST_F()
83 EXPECT_FALSE(file_util::PathExists(temp_file)); in TEST_F()
[all …]
Dsafe_browsing_store_file.cc164 if (!file_util::GetFileSize(filename, &size)) in FileHeaderSanityCheck()
208 if (file_util::PathExists(original_filename)) { in CheckForOriginalAndDelete()
210 if (file_util::GetFileSize(original_filename, &size)) { in CheckForOriginalAndDelete()
215 if (file_util::Delete(original_filename, false)) { in CheckForOriginalAndDelete()
225 file_util::Delete(journal_filename, false); in CheckForOriginalAndDelete()
248 if (!file_util::Delete(filename_, false) && in Delete()
249 file_util::PathExists(filename_)) { in Delete()
255 if (!file_util::Delete(new_filename, false) && in Delete()
256 file_util::PathExists(new_filename)) { in Delete()
266 if (file_util::PathExists(journal_filename)) in Delete()
[all …]
/external/chromium/chrome/browser/download/
Dsave_page_browsertest.cc76 EXPECT_TRUE(file_util::PathExists(full_file_name)); in IN_PROC_BROWSER_TEST_F()
77 EXPECT_FALSE(file_util::PathExists(dir)); in IN_PROC_BROWSER_TEST_F()
78 EXPECT_TRUE(file_util::ContentsEqual( in IN_PROC_BROWSER_TEST_F()
105 EXPECT_TRUE(file_util::PathExists(full_file_name)); in IN_PROC_BROWSER_TEST_F()
106 EXPECT_FALSE(file_util::PathExists(dir)); in IN_PROC_BROWSER_TEST_F()
107 EXPECT_TRUE(file_util::ContentsEqual( in IN_PROC_BROWSER_TEST_F()
131 EXPECT_TRUE(file_util::PathExists(full_file_name)); in IN_PROC_BROWSER_TEST_F()
132 EXPECT_TRUE(file_util::PathExists(dir)); in IN_PROC_BROWSER_TEST_F()
133 EXPECT_TRUE(file_util::TextContentsEqual( in IN_PROC_BROWSER_TEST_F()
136 EXPECT_TRUE(file_util::ContentsEqual( in IN_PROC_BROWSER_TEST_F()
[all …]
Dbase_file_unittest.cc43 EXPECT_TRUE(file_util::ReadFileToString(full_path, &disk_data)); in TearDown()
51 EXPECT_EQ(expect_file_survives_, file_util::PathExists(full_path)); in TearDown()
93 EXPECT_TRUE(file_util::PathExists(base_file_->full_path())); in TEST_F()
95 EXPECT_FALSE(file_util::PathExists(base_file_->full_path())); in TEST_F()
129 EXPECT_TRUE(file_util::PathExists(initial_path)); in TEST_F()
131 EXPECT_FALSE(file_util::PathExists(new_path)); in TEST_F()
136 EXPECT_FALSE(file_util::PathExists(initial_path)); in TEST_F()
137 EXPECT_TRUE(file_util::PathExists(new_path)); in TEST_F()
196 EXPECT_TRUE(file_util::PathExists(initial_path)); in TEST_F()
198 EXPECT_FALSE(file_util::PathExists(new_path)); in TEST_F()
[all …]
Ddownload_file_unittest.cc75 EXPECT_TRUE(file_util::ReadFileToString((*file)->full_path(), in DestroyDownloadFile()
133 EXPECT_TRUE(file_util::PathExists(initial_path)); in TEST_F()
145 EXPECT_FALSE(file_util::PathExists(initial_path)); in TEST_F()
146 EXPECT_TRUE(file_util::PathExists(path_1)); in TEST_F()
158 EXPECT_FALSE(file_util::PathExists(path_1)); in TEST_F()
159 EXPECT_TRUE(file_util::PathExists(path_2)); in TEST_F()
169 EXPECT_FALSE(file_util::PathExists(path_2)); in TEST_F()
170 EXPECT_TRUE(file_util::PathExists(path_3)); in TEST_F()
184 EXPECT_FALSE(file_util::PathExists(path_3)); in TEST_F()
185 EXPECT_TRUE(file_util::PathExists(path_4)); in TEST_F()
/external/chromium/chrome/browser/extensions/
Dsandboxed_extension_unpacker_unittest.cc78 ASSERT_TRUE(file_util::PathExists(original_path)) << original_path.value(); in SetupUnpacker()
84 ASSERT_TRUE(file_util::CopyFile(original_path, crx_path)) << in SetupUnpacker()
93 ASSERT_TRUE(file_util::CreateDirectory(temp_path_)); in SetupUnpacker()
127 file_util::FileEnumerator::FILE_TYPE files_and_dirs = in TempFilesRemoved()
128 static_cast<file_util::FileEnumerator::FILE_TYPE>( in TempFilesRemoved()
129 file_util::FileEnumerator::DIRECTORIES | in TempFilesRemoved()
130 file_util::FileEnumerator::FILES); in TempFilesRemoved()
132 file_util::FileEnumerator temp_iterator( in TempFilesRemoved()
171 EXPECT_FALSE(file_util::PathExists(install_path)); in TEST_F()
176 EXPECT_FALSE(file_util::PathExists(install_path)); in TEST_F()
[all …]
Dextension_creator.cc33 !file_util::DirectoryExists(extension_dir)) { in InitializeInput()
40 if (!file_util::AbsolutePath(&absolute_extension_dir)) { in InitializeInput()
48 !file_util::PathExists(private_key_path)) { in InitializeInput()
58 file_util::PathExists(private_key_output_path)) { in InitializeInput()
79 if (!file_util::PathExists(private_key_path)) { in ReadInputKey()
86 if (!file_util::ReadFileToString(private_key_path, in ReadInputKey()
140 if (-1 == file_util::WriteFile(output_private_key_path, in GenerateKey()
170 ScopedStdioHandle zip_handle(file_util::OpenFile(zip_path, "rb")); in SignZip()
192 if (file_util::PathExists(crx_path)) in WriteCRX()
193 file_util::Delete(crx_path, false); in WriteCRX()
[all …]
/external/chromium/chrome/browser/importer/
Dfirefox_profile_lock_unittest.cc38 ASSERT_TRUE(file_util::CreateNewTempDirectory( in TEST_F()
46 EXPECT_FALSE(file_util::PathExists(lock_file_path)); in TEST_F()
49 EXPECT_TRUE(file_util::PathExists(lock_file_path)); in TEST_F()
55 EXPECT_FALSE(file_util::PathExists(lock_file_path)); in TEST_F()
59 EXPECT_TRUE(file_util::PathExists(lock_file_path)); in TEST_F()
66 EXPECT_FALSE(file_util::PathExists(lock_file_path)); in TEST_F()
74 ASSERT_TRUE(file_util::CreateNewTempDirectory( in TEST_F()
81 FILE* lock_file = file_util::OpenFile(lock_file_path, "w"); in TEST_F()
83 file_util::CloseFile(lock_file); in TEST_F()
84 EXPECT_TRUE(file_util::PathExists(lock_file_path)); in TEST_F()
[all …]
/external/chromium/chrome/browser/google/
Dgoogle_update_settings_posix.cc25 bool consented = file_util::ReadFileToString(consent_file, &tmp_guid); in GetCollectStatsConsent()
35 if (!file_util::DirectoryExists(consent_dir)) in SetCollectStatsConsent()
40 if ((!file_util::PathExists(consent_file)) || in SetCollectStatsConsent()
41 (file_util::PathExists(consent_file) && in SetCollectStatsConsent()
45 return file_util::WriteFile(consent_file, c_str, size) == size; in SetCollectStatsConsent()
49 return file_util::Delete(consent_file, false); in SetCollectStatsConsent()
58 if (!file_util::DirectoryExists(consent_dir) || in SetMetricsId()
/external/chromium/chrome/common/
Djson_pref_store_unittest.cc31 ASSERT_TRUE(file_util::PathExists(data_dir_)); in SetUp()
46 ASSERT_FALSE(file_util::PathExists(bogus_input_file)); in TEST_F()
58 ASSERT_TRUE(file_util::CopyFile(invalid_file_original, invalid_file)); in TEST_F()
66 EXPECT_FALSE(file_util::PathExists(invalid_file)); in TEST_F()
68 EXPECT_TRUE(file_util::PathExists(moved_aside)); in TEST_F()
69 EXPECT_TRUE(file_util::TextContentsEqual(invalid_file_original, in TEST_F()
74 ASSERT_TRUE(file_util::CopyFile(data_dir_.AppendASCII("read.json"), in TEST_F()
79 ASSERT_TRUE(file_util::PathExists(input_file)); in TEST_F()
157 ASSERT_TRUE(file_util::PathExists(golden_output_file)); in TEST_F()
160 EXPECT_TRUE(file_util::TextContentsEqual(golden_output_file, output_file)); in TEST_F()
[all …]
/external/chromium/chrome/browser/policy/
Dconfig_dir_policy_provider.cc23 file_util::FileEnumerator file_enumerator(config_file_path(), false, in Load()
24 file_util::FileEnumerator::FILES); in Load()
58 if (!file_util::GetFileInfo(config_file_path(), &file_info) || in GetLastModification()
64 file_util::FileEnumerator file_enumerator(config_file_path(), in GetLastModification()
66 file_util::FileEnumerator::FILES); in GetLastModification()
70 if (file_util::GetFileInfo(config_file, &file_info) && in GetLastModification()

12345678910>>...14