Home
last modified time | relevance | path

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

1234

/external/chromium/base/
Dfile_util_unittest.cc34 const file_util::FileEnumerator::FILE_TYPE FILES_AND_DIRECTORIES =
35 static_cast<file_util::FileEnumerator::FILE_TYPE>(
36 file_util::FileEnumerator::FILES |
37 file_util::FileEnumerator::DIRECTORIES);
50 file_util::Delete(test_dir_, true); in SetUp()
51 file_util::CreateDirectory(test_dir_); in SetUp()
56 ASSERT_TRUE(file_util::Delete(test_dir_, true)); in TearDown()
57 ASSERT_FALSE(file_util::PathExists(test_dir_)); in TearDown()
68 explicit FindResultCollector(file_util::FileEnumerator& enumerator) { in FindResultCollector()
152 file_util::AppendToPath(&result, value.ending); in TEST_F()
[all …]
Dscoped_temp_dir_unittest.cc11 file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_temp_dir"), in TEST()
15 EXPECT_TRUE(file_util::DirectoryExists(test_path)); in TEST()
21 EXPECT_FALSE(file_util::DirectoryExists(test_path)); in TEST()
27 EXPECT_TRUE(file_util::DirectoryExists(test_path)); in TEST()
33 EXPECT_TRUE(file_util::DirectoryExists(test_path)); in TEST()
40 EXPECT_FALSE(file_util::DirectoryExists(test_path)); in TEST()
51 EXPECT_TRUE(file_util::DirectoryExists(test_path)); in TEST()
53 EXPECT_TRUE(file_util::GetTempDir(&tmp_dir)); in TEST()
56 EXPECT_FALSE(file_util::DirectoryExists(test_path)); in TEST()
Ddata_pack.cc59 mmap_.reset(new file_util::MemoryMappedFile); in Load()
136 FILE* file = file_util::OpenFile(path, "wb"); in WritePack()
142 file_util::CloseFile(file); in WritePack()
151 file_util::CloseFile(file); in WritePack()
162 file_util::CloseFile(file); in WritePack()
168 file_util::CloseFile(file); in WritePack()
175 file_util::CloseFile(file); in WritePack()
186 file_util::CloseFile(file); in WritePack()
191 file_util::CloseFile(file); in WritePack()
Dscoped_temp_dir.cc15 if (!path_.empty() && !file_util::Delete(path_, true)) in ~ScopedTempDir()
22 if (!file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_dir"), in CreateUniqueTempDir()
31 if (!file_util::DirectoryExists(path) && in Set()
32 !file_util::CreateDirectory(path)) { in Set()
46 return !path_.empty() && file_util::DirectoryExists(path_); in IsValid()
Devent_recorder.cc53 file_ = file_util::OpenFile(filename, "wb+"); in StartRecording()
67 file_util::CloseFile(file_); in StartRecording()
88 file_util::CloseFile(file_); in StopRecording()
104 file_ = file_util::OpenFile(filename, "rb"); in StartPlayback()
112 file_util::CloseFile(file_); in StartPlayback()
154 file_util::CloseFile(file_); in StopPlayback()
Dshared_memory_posix.cc104 if (file_util::PathExists(path)) { in Delete()
105 return file_util::Delete(path, false); in Delete()
132 if (file_util::GetShmemTempDir(&temp_dir) == false) in FilePathForMemoryName()
150 file_util::ScopedFILE file_closer; in CreateOrOpen()
160 fp = file_util::CreateAndOpenTemporaryShmemFile(&path); in CreateOrOpen()
165 file_util::Delete(path, false); in CreateOrOpen()
187 fp = file_util::OpenFile(path, mode.c_str()); in CreateOrOpen()
Ddirectory_watcher_unittest.cc50 file_util::Delete(test_dir_, true); in SetUp()
51 file_util::CreateDirectory(test_dir_); in SetUp()
59 ASSERT_TRUE(file_util::Delete(test_dir_, true)); in TearDown()
60 ASSERT_FALSE(file_util::PathExists(test_dir_)); in TearDown()
66 return (file_util::WriteFile(filename, content.c_str(), content.length()) == in WriteTestFile()
74 EXPECT_TRUE(file_util::CreateDirectory(path)); in CreateTestDirDirectoryASCII()
195 ASSERT_TRUE(file_util::Delete(test_dir_.AppendASCII("test_file"), false)); in TEST_F()
380 ASSERT_TRUE(file_util::Delete(subdir, true)); in TEST_F()
403 ASSERT_TRUE(file_util::Move(subdir1.AppendASCII("file"), in TEST_F()
Dnative_library_win.cc20 if (file_util::GetCurrentDirectory(&current_directory)) { in LoadNativeLibrary()
23 file_util::SetCurrentDirectory(plugin_path); in LoadNativeLibrary()
30 file_util::SetCurrentDirectory(current_directory); in LoadNativeLibrary()
Dbase_paths_posix.cc47 if (file_util::PathExists(path.Append("base/base_paths_posix.cc"))) { in PathProviderPosix()
54 if (file_util::GetCurrentDirectory(&path) && in PathProviderPosix()
55 file_util::PathExists(path.Append("base/base_paths_posix.cc"))) { in PathProviderPosix()
Dprocess_util_linux.cc37 if (!file_util::ReadFileToString(stat_file, &mem_stats)) in GetProcStats()
51 if (!file_util::ReadFileToString(stat_file, &status)) in GetParentProcessId()
266 if (file_util::ReadFileToString(stat_file, &smaps) && smaps.length() > 0) { in GetWorkingSetKBytes()
301 if (!file_util::ReadFileToString(stat_file, &statm) || statm.length() == 0) in GetWorkingSetKBytes()
328 if (!file_util::ReadFileToString(io_file, &proc_io_contents)) in GetIOCounters()
400 if (file_util::ReadFileToString(stat_path, &stat)) { in GetProcessCPU()
474 if (!file_util::ReadFileToString(meminfo_file, &meminfo_data)) { in GetSystemCommitCharge()
611 if (!file_util::PathExists(oom_adj)) in AdjustOOMScore()
616 file_util::WriteFile(oom_adj, score_str.c_str(), score_str.length())); in AdjustOOMScore()
Dmime_util_linux.cc162 if (!file_util::DirectoryExists(theme_path)) in IconTheme()
165 if (!index_theme_loaded_ && file_util::PathExists(theme_index)) { in IconTheme()
241 if (file_util::PathExists(icon_path)) in GetIconPathUnderSubdir()
249 FILE* fp = file_util::OpenFile(file, "r"); in LoadIndexTheme()
310 file_util::CloseFile(fp); in LoadIndexTheme()
382 if (!file_util::DirectoryExists(dir)) in TryAddIconDir()
389 if (!file_util::DirectoryExists(dir)) in AddXDGDataDir()
402 if (file_util::DirectoryExists(legacy_data_dir)) in InitIconDir()
461 if (file_util::PathExists(icon)) in LookupFallbackIcon()
607 if (file_util::PathExists(icon_file)) in GetMimeIcon()
Dpath_service.cc164 return file_util::GetCurrentDirectory(result); in Get()
221 if (!file_util::PathExists(file_path) && in Override()
222 !file_util::CreateDirectory(file_path)) in Override()
228 if (!file_util::AbsolutePath(&file_path)) in Override()
Ddirectory_watcher_mac.cc37 if (!file_util::AbsolutePath(&absolute_event_path)) in OnFSEventsCallback()
81 if (!file_util::PathExists(path)) in Watch()
85 if (!file_util::AbsolutePath(&path_)) { in Watch()
/external/chromium/net/base/
Ddirectory_lister.cc36 std::vector<file_util::FileEnumerator::FindInfo> data;
42 static bool CompareFindInfo(const file_util::FileEnumerator::FindInfo& a, in CompareFindInfo()
43 const file_util::FileEnumerator::FindInfo& b) { in CompareFindInfo()
44 bool a_is_directory = file_util::FileEnumerator::IsDirectory(a); in CompareFindInfo()
45 bool b_is_directory = file_util::FileEnumerator::IsDirectory(b); in CompareFindInfo()
50 return file_util::LocaleAwareCompareFilenames(FilePath(a.cFileName), in CompareFindInfo()
53 return file_util::LocaleAwareCompareFilenames(FilePath(a.filename), in CompareFindInfo()
102 if (!file_util::DirectoryExists(dir_)) { in ThreadMain()
109 file_util::FileEnumerator file_enum(dir_, false, in ThreadMain()
110 static_cast<file_util::FileEnumerator::FILE_TYPE>( in ThreadMain()
[all …]
Ddirectory_lister_unittest.cc22 void OnListFile(const file_util::FileEnumerator::FindInfo& data) { in OnListFile()
34 if (file_util::FileEnumerator::IsDirectory(file_list_[previous]) && in OnListDone()
35 !file_util::FileEnumerator::IsDirectory(file_list_[current])) { in OnListDone()
38 EXPECT_EQ(file_util::FileEnumerator::IsDirectory(file_list_[previous]), in OnListDone()
39 file_util::FileEnumerator::IsDirectory(file_list_[current])); in OnListDone()
41 EXPECT_TRUE(file_util::LocaleAwareCompareFilenames( in OnListDone()
45 EXPECT_TRUE(file_util::LocaleAwareCompareFilenames( in OnListDone()
55 std::vector<file_util::FileEnumerator::FindInfo> file_list_;
Dfile_stream_unittest.cc24 file_util::CreateTemporaryFile(&temp_file_path_); in SetUp()
25 file_util::WriteFile(temp_file_path_, kTestData, kTestDataSize); in SetUp()
28 file_util::Delete(temp_file_path_, false); in TearDown()
50 file_util::WriteFile(temp_file_path(), kTestData, kTestDataSize)); in TEST_F()
66 file_util::Delete(temp_file_path(), false); in TEST_F()
78 file_util::ReadFile(temp_file_path(), buffer, kTestDataSize)); in TEST_F()
103 bool ok = file_util::GetFileSize(temp_file_path(), &file_size); in TEST_F()
133 bool ok = file_util::GetFileSize(temp_file_path(), &file_size); in TEST_F()
168 bool ok = file_util::GetFileSize(temp_file_path(), &file_size); in TEST_F()
198 bool ok = file_util::GetFileSize(temp_file_path(), &file_size); in TEST_F()
[all …]
/external/chromium/net/disk_cache/
Dcache_util_posix.cc15 return file_util::Move(from_path, to_path); in MoveCache()
19 file_util::FileEnumerator iter(path, in DeleteCache()
21 file_util::FileEnumerator::FILES); in DeleteCache()
23 if (!file_util::Delete(file, /* recursive */ false)) in DeleteCache()
28 if (!file_util::Delete(path, /* recursive */ false)) in DeleteCache()
34 return file_util::Delete(name, false); in DeleteCacheFile()
Dblock_files_unittest.cc18 file_util::FileEnumerator iter(path, false, file_util::FileEnumerator::FILES); in NumberOfFiles()
33 ASSERT_TRUE(file_util::CreateDirectory(path)); in TEST_F()
60 ASSERT_TRUE(file_util::CreateDirectory(path)); in TEST_F()
84 ASSERT_TRUE(file_util::CreateDirectory(path)); in TEST_F()
162 ASSERT_TRUE(file_util::CreateDirectory(path)); in TEST_F()
184 ASSERT_TRUE(file_util::CreateDirectory(path)); in TEST_F()
198 file_util::WriteFile(filename, header, kBlockHeaderSize)); in TEST_F()
Ddisk_cache_perftest.cc175 ASSERT_TRUE(file_util::EvictFileFromSystemCache( in TEST_F()
177 ASSERT_TRUE(file_util::EvictFileFromSystemCache( in TEST_F()
179 ASSERT_TRUE(file_util::EvictFileFromSystemCache( in TEST_F()
181 ASSERT_TRUE(file_util::EvictFileFromSystemCache( in TEST_F()
183 ASSERT_TRUE(file_util::EvictFileFromSystemCache( in TEST_F()
/external/chromium/base/i18n/
Dfile_util_icu_unittest.cc24 file_util::Delete(test_dir_, true); in SetUp()
25 file_util::CreateDirectory(test_dir_); in SetUp()
30 ASSERT_TRUE(file_util::Delete(test_dir_, true)); in TearDown()
31 ASSERT_FALSE(file_util::PathExists(test_dir_)); in TearDown()
53 file_util::ReplaceIllegalCharactersInPath(&bad_name, '-'); in TEST_F()
94 file_util::ReplaceIllegalCharactersInPath(&bad_name, '-'); in TEST_F()
98 file_util::ReplaceIllegalCharactersInPath(&bad_name, '-'); in TEST_F()
/external/chromium/net/url_request/
Durl_request_file_job.cc46 file_util::FileInfo file_info; in Resolve()
47 bool exists = file_util::GetFileInfo(file_path, &file_info); in Resolve()
67 void ReturnResults(bool exists, const file_util::FileInfo& file_info) { in ReturnResults()
84 file_util::EnsureEndsWithSeparator(&file_path) && in Factory()
120 file_util::FileInfo file_info; in Start()
121 bool exists = file_util::GetFileInfo(file_path_, &file_info); in Start()
208 bool exists, const file_util::FileInfo& file_info) { in DidResolve()
280 file_util::GetFileExtensionFromPath(file_path_.value()); in IsRedirectResponse()
289 resolved = file_util::ResolveShortcut(&new_path); in IsRedirectResponse()
Durl_request_unittest.cc561 file_util::SetCurrentDirectory(dir); in TEST_F()
581 ASSERT_EQ(true, file_util::GetFileSize(path, &longsize)); in TEST_F()
585 int size_read = static_cast<int>(file_util::ReadFile(path, in TEST_F()
667 EXPECT_TRUE(file_util::GetFileSize(app_path, &file_size)); in TEST_F()
682 EXPECT_TRUE(file_util::CreateTemporaryFile(&temp_path)); in TEST_F()
684 EXPECT_TRUE(file_util::WriteFile(temp_path, buffer.get(), buffer_size)); in TEST_F()
687 EXPECT_TRUE(file_util::GetFileSize(temp_path, &file_size)); in TEST_F()
714 EXPECT_TRUE(file_util::Delete(temp_path, false)); in TEST_F()
723 EXPECT_TRUE(file_util::CreateTemporaryFile(&temp_path)); in TEST_F()
725 EXPECT_TRUE(file_util::WriteFile(temp_path, buffer.get(), buffer_size)); in TEST_F()
[all …]
/external/chromium/net/tools/dump_cache/
Ddump_files.cc83 std::wstring file_name = file_util::GetFilenameFromPath(name); in DumpBlockHeader()
141 file_util::AppendToPath(&index_name, kIndexName); in Init()
258 file_util::AppendToPath(&index_name, kIndexName); in GetMajorVersion()
265 file_util::AppendToPath(&data_name, L"data_0"); in GetMajorVersion()
270 file_util::AppendToPath(&data_name, L"data_1"); in GetMajorVersion()
280 file_util::AppendToPath(&index_name, kIndexName); in DumpHeaders()
285 file_util::FileEnumerator iter(FilePath::FromWStringHack(input_path), false, in DumpHeaders()
286 file_util::FileEnumerator::FILES, pattern); in DumpHeaders()
/external/chromium/base/test/
Dtest_file_util_win.cc17 namespace file_util { namespace
25 if (!file_util::PathExists(file)) in DieFileDie()
32 if (file_util::Delete(file, recurse)) in DieFileDie()
135 file_util::AppendToPath(&src, L"*"); in CopyRecursiveDirNoCache()
Dtest_file_util_mac.cc12 namespace file_util { namespace
20 file_util::MemoryMappedFile mapped_file; in EvictFileFromSystemCache()

1234