Lines Matching refs:file_util
115 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()
350 EXPECT_TRUE(file_util::Delete(new_file_name, false)); in TEST_F()
351 EXPECT_EQ(0, file_util::CountFilesCreatedAfter(temp_dir_.path(), now)); in TEST_F()
360 ASSERT_TRUE(file_util::GetFileSize(file_01, &size_f1)); in TEST_F()
364 file_util::CreateDirectory(subdir_path); in TEST_F()
369 ASSERT_TRUE(file_util::GetFileSize(file_02, &size_f2)); in TEST_F()
373 file_util::CreateDirectory(subsubdir_path); in TEST_F()
378 int64 computed_size = file_util::ComputeDirectorySize(temp_dir_.path()); in TEST_F()
382 file_util::ComputeFilesSize(temp_dir_.path(), FPL("The file*")); in TEST_F()
385 computed_size = file_util::ComputeFilesSize(temp_dir_.path(), FPL("bla*")); in TEST_F()
395 file_util::CreateDirectory(dir_path); in TEST_F()
398 ASSERT_FALSE(file_util::PathExists(file_a_path)); in TEST_F()
399 ASSERT_FALSE(file_util::NormalizeFilePath(file_a_path, in TEST_F()
404 ASSERT_TRUE(file_util::PathExists(file_a_path)); in TEST_F()
405 ASSERT_TRUE(file_util::NormalizeFilePath(file_a_path, in TEST_F()
409 ASSERT_TRUE(file_util::PathExists(file_b_path)); in TEST_F()
410 ASSERT_TRUE(file_util::NormalizeFilePath(file_b_path, in TEST_F()
438 ASSERT_TRUE(file_util::CreateDirectory(base_a)); in TEST_F()
441 ASSERT_TRUE(file_util::CreateDirectory(sub_a)); in TEST_F()
469 ASSERT_TRUE(file_util::CreateDirectory(sub_long)); in TEST_F()
473 ASSERT_TRUE(file_util::CreateDirectory(base_b)); in TEST_F()
476 ASSERT_TRUE(file_util::CreateDirectory(to_sub_a)); in TEST_F()
489 ASSERT_TRUE(file_util::CreateDirectory(to_base_b)); in TEST_F()
502 ASSERT_TRUE(file_util::CreateDirectory(to_sub_long)); in TEST_F()
516 ASSERT_TRUE(file_util::NormalizeFilePath(file_txt, &normalized_path)); in TEST_F()
521 ASSERT_TRUE(file_util::NormalizeFilePath(to_sub_a.Append(FPL("file.txt")), in TEST_F()
527 ASSERT_TRUE(file_util::NormalizeFilePath(base_b.Append(FPL("to_base_b")) in TEST_F()
545 ASSERT_FALSE(file_util::NormalizeFilePath(long_path, &normalized_path)); in TEST_F()
549 ASSERT_FALSE(file_util::NormalizeFilePath(to_sub_long.Append(deep_txt), in TEST_F()
558 ASSERT_FALSE(file_util::NormalizeFilePath(to_sub_a.Append(FPL("file.txt")), in TEST_F()
571 ASSERT_TRUE(file_util::CreateSymbolicLink(link_to, link_from)) in TEST_F()
580 ASSERT_TRUE(file_util::ReadSymbolicLink(link_from, &result)); in TEST_F()
586 file_util::CreateDirectory(link_to); in TEST_F()
588 ASSERT_TRUE(file_util::CreateSymbolicLink(link_to, link_from)) in TEST_F()
592 ASSERT_FALSE(file_util::CreateSymbolicLink(link_to, link_to)); in TEST_F()
593 ASSERT_FALSE(file_util::ReadSymbolicLink(link_to, &result)); in TEST_F()
595 ASSERT_FALSE(file_util::ReadSymbolicLink(missing, &result)); in TEST_F()
612 ASSERT_TRUE(file_util::CreateSymbolicLink(link_to, link_from)) in TEST_F()
616 ASSERT_TRUE(file_util::NormalizeFilePath(link_from, &normalized_path)); in TEST_F()
624 file_util::CreateDirectory(link_to); in TEST_F()
626 ASSERT_TRUE(file_util::CreateSymbolicLink(link_to, link_from)) in TEST_F()
629 ASSERT_FALSE(file_util::NormalizeFilePath(link_from, &normalized_path)) in TEST_F()
635 ASSERT_TRUE(file_util::CreateSymbolicLink(link_to, link_from)) in TEST_F()
637 ASSERT_TRUE(file_util::CreateSymbolicLink(link_from, link_to)) in TEST_F()
641 ASSERT_FALSE(file_util::NormalizeFilePath(link_from, &normalized_path)); in TEST_F()
647 ASSERT_FALSE(file_util::PathExists(non_existent)); in TEST_F()
649 EXPECT_TRUE(file_util::Delete(non_existent, false)); in TEST_F()
650 ASSERT_FALSE(file_util::PathExists(non_existent)); in TEST_F()
651 EXPECT_TRUE(file_util::Delete(non_existent, true)); in TEST_F()
652 ASSERT_FALSE(file_util::PathExists(non_existent)); in TEST_F()
659 ASSERT_TRUE(file_util::PathExists(file_name)); in TEST_F()
662 EXPECT_TRUE(file_util::Delete(file_name, false)); in TEST_F()
663 EXPECT_FALSE(file_util::PathExists(file_name)); in TEST_F()
668 ASSERT_TRUE(file_util::PathExists(file_name)); in TEST_F()
671 EXPECT_TRUE(file_util::Delete(file_name, true)); in TEST_F()
672 EXPECT_FALSE(file_util::PathExists(file_name)); in TEST_F()
683 ASSERT_TRUE(file_util::PathExists(file_name)); in TEST_F()
686 file_util::CreateDirectory(subdir_path); in TEST_F()
687 ASSERT_TRUE(file_util::PathExists(subdir_path)); in TEST_F()
694 EXPECT_TRUE(file_util::Delete(directory_contents, false)); in TEST_F()
695 EXPECT_FALSE(file_util::PathExists(file_name)); in TEST_F()
696 EXPECT_TRUE(file_util::PathExists(subdir_path)); in TEST_F()
699 EXPECT_TRUE(file_util::Delete(directory_contents, true)); in TEST_F()
700 EXPECT_FALSE(file_util::PathExists(file_name)); in TEST_F()
701 EXPECT_FALSE(file_util::PathExists(subdir_path)); in TEST_F()
709 file_util::CreateDirectory(subdir_path); in TEST_F()
710 ASSERT_TRUE(file_util::PathExists(subdir_path)); in TEST_F()
717 EXPECT_TRUE(file_util::Delete(directory_contents, false)); in TEST_F()
718 EXPECT_TRUE(file_util::PathExists(subdir_path)); in TEST_F()
721 EXPECT_TRUE(file_util::Delete(directory_contents, true)); in TEST_F()
722 EXPECT_TRUE(file_util::PathExists(subdir_path)); in TEST_F()
730 file_util::CreateDirectory(test_subdir); in TEST_F()
731 ASSERT_TRUE(file_util::PathExists(test_subdir)); in TEST_F()
735 ASSERT_TRUE(file_util::PathExists(file_name)); in TEST_F()
738 file_util::CreateDirectory(subdir_path1); in TEST_F()
739 ASSERT_TRUE(file_util::PathExists(subdir_path1)); in TEST_F()
742 file_util::CreateDirectory(subdir_path2); in TEST_F()
743 ASSERT_TRUE(file_util::PathExists(subdir_path2)); in TEST_F()
746 EXPECT_TRUE(file_util::Delete(subdir_path2, false)); in TEST_F()
747 EXPECT_FALSE(file_util::PathExists(subdir_path2)); in TEST_F()
750 EXPECT_FALSE(file_util::Delete(test_subdir, false)); in TEST_F()
751 EXPECT_TRUE(file_util::PathExists(test_subdir)); in TEST_F()
752 EXPECT_TRUE(file_util::PathExists(file_name)); in TEST_F()
753 EXPECT_TRUE(file_util::PathExists(subdir_path1)); in TEST_F()
760 file_util::CreateDirectory(test_subdir); in TEST_F()
761 ASSERT_TRUE(file_util::PathExists(test_subdir)); in TEST_F()
765 ASSERT_TRUE(file_util::PathExists(file_name)); in TEST_F()
768 file_util::CreateDirectory(subdir_path1); in TEST_F()
769 ASSERT_TRUE(file_util::PathExists(subdir_path1)); in TEST_F()
772 file_util::CreateDirectory(subdir_path2); in TEST_F()
773 ASSERT_TRUE(file_util::PathExists(subdir_path2)); in TEST_F()
776 EXPECT_TRUE(file_util::Delete(subdir_path2, true)); in TEST_F()
777 EXPECT_FALSE(file_util::PathExists(subdir_path2)); in TEST_F()
780 EXPECT_TRUE(file_util::Delete(test_subdir, true)); in TEST_F()
781 EXPECT_FALSE(file_util::PathExists(file_name)); in TEST_F()
782 EXPECT_FALSE(file_util::PathExists(subdir_path1)); in TEST_F()
783 EXPECT_FALSE(file_util::PathExists(test_subdir)); in TEST_F()
791 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
796 ASSERT_FALSE(file_util::PathExists(file_name_to)); in TEST_F()
798 EXPECT_TRUE(file_util::Move(file_name_from, file_name_to)); in TEST_F()
801 EXPECT_FALSE(file_util::PathExists(file_name_from)); in TEST_F()
802 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
810 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
816 ASSERT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
818 EXPECT_TRUE(file_util::Move(file_name_from, file_name_to)); in TEST_F()
821 EXPECT_FALSE(file_util::PathExists(file_name_from)); in TEST_F()
822 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
831 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
836 file_util::CreateDirectory(dir_name_to); in TEST_F()
837 ASSERT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
839 EXPECT_FALSE(file_util::Move(file_name_from, dir_name_to)); in TEST_F()
847 file_util::CreateDirectory(dir_name_from); in TEST_F()
848 ASSERT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
854 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
862 ASSERT_FALSE(file_util::PathExists(dir_name_to)); in TEST_F()
864 EXPECT_TRUE(file_util::Move(dir_name_from, dir_name_to)); in TEST_F()
867 EXPECT_FALSE(file_util::PathExists(dir_name_from)); in TEST_F()
868 EXPECT_FALSE(file_util::PathExists(file_name_from)); in TEST_F()
869 EXPECT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
870 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
877 file_util::CreateDirectory(dir_name_from); in TEST_F()
878 ASSERT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
884 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
896 file_util::CreateDirectory(dir_name_exists); in TEST_F()
897 ASSERT_TRUE(file_util::PathExists(dir_name_exists)); in TEST_F()
899 EXPECT_TRUE(file_util::Move(dir_name_from, dir_name_to)); in TEST_F()
902 EXPECT_FALSE(file_util::PathExists(dir_name_from)); in TEST_F()
903 EXPECT_FALSE(file_util::PathExists(file_name_from)); in TEST_F()
904 EXPECT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
905 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
912 file_util::CreateDirectory(dir_name_from); in TEST_F()
913 ASSERT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
919 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
924 file_util::CreateDirectory(subdir_name_from); in TEST_F()
925 ASSERT_TRUE(file_util::PathExists(subdir_name_from)); in TEST_F()
931 ASSERT_TRUE(file_util::PathExists(file_name2_from)); in TEST_F()
943 ASSERT_FALSE(file_util::PathExists(dir_name_to)); in TEST_F()
945 EXPECT_TRUE(file_util::CopyDirectory(dir_name_from, dir_name_to, true)); in TEST_F()
948 EXPECT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
949 EXPECT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
950 EXPECT_TRUE(file_util::PathExists(subdir_name_from)); in TEST_F()
951 EXPECT_TRUE(file_util::PathExists(file_name2_from)); in TEST_F()
952 EXPECT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
953 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
954 EXPECT_TRUE(file_util::PathExists(subdir_name_to)); in TEST_F()
955 EXPECT_TRUE(file_util::PathExists(file_name2_to)); in TEST_F()
962 file_util::CreateDirectory(dir_name_from); in TEST_F()
963 ASSERT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
969 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
974 file_util::CreateDirectory(subdir_name_from); in TEST_F()
975 ASSERT_TRUE(file_util::PathExists(subdir_name_from)); in TEST_F()
981 ASSERT_TRUE(file_util::PathExists(file_name2_from)); in TEST_F()
997 file_util::CreateDirectory(dir_name_exists); in TEST_F()
998 ASSERT_TRUE(file_util::PathExists(dir_name_exists)); in TEST_F()
1000 EXPECT_TRUE(file_util::CopyDirectory(dir_name_from, dir_name_exists, true)); in TEST_F()
1003 EXPECT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
1004 EXPECT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1005 EXPECT_TRUE(file_util::PathExists(subdir_name_from)); in TEST_F()
1006 EXPECT_TRUE(file_util::PathExists(file_name2_from)); in TEST_F()
1007 EXPECT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
1008 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
1009 EXPECT_TRUE(file_util::PathExists(subdir_name_to)); in TEST_F()
1010 EXPECT_TRUE(file_util::PathExists(file_name2_to)); in TEST_F()
1017 file_util::CreateDirectory(dir_name_from); in TEST_F()
1018 ASSERT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
1024 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1029 file_util::CreateDirectory(subdir_name_from); in TEST_F()
1030 ASSERT_TRUE(file_util::PathExists(subdir_name_from)); in TEST_F()
1036 ASSERT_TRUE(file_util::PathExists(file_name2_from)); in TEST_F()
1046 ASSERT_FALSE(file_util::PathExists(dir_name_to)); in TEST_F()
1048 EXPECT_TRUE(file_util::CopyDirectory(dir_name_from, dir_name_to, false)); in TEST_F()
1051 EXPECT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
1052 EXPECT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1053 EXPECT_TRUE(file_util::PathExists(subdir_name_from)); in TEST_F()
1054 EXPECT_TRUE(file_util::PathExists(file_name2_from)); in TEST_F()
1055 EXPECT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
1056 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
1057 EXPECT_FALSE(file_util::PathExists(subdir_name_to)); in TEST_F()
1064 file_util::CreateDirectory(dir_name_from); in TEST_F()
1065 ASSERT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
1071 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1076 file_util::CreateDirectory(subdir_name_from); in TEST_F()
1077 ASSERT_TRUE(file_util::PathExists(subdir_name_from)); in TEST_F()
1083 ASSERT_TRUE(file_util::PathExists(file_name2_from)); in TEST_F()
1094 file_util::CreateDirectory(dir_name_to); in TEST_F()
1095 ASSERT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
1097 EXPECT_TRUE(file_util::CopyDirectory(dir_name_from, dir_name_to, false)); in TEST_F()
1100 EXPECT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
1101 EXPECT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1102 EXPECT_TRUE(file_util::PathExists(subdir_name_from)); in TEST_F()
1103 EXPECT_TRUE(file_util::PathExists(file_name2_from)); in TEST_F()
1104 EXPECT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
1105 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
1106 EXPECT_FALSE(file_util::PathExists(subdir_name_to)); in TEST_F()
1114 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1119 ASSERT_FALSE(file_util::PathExists(file_name_to)); in TEST_F()
1121 EXPECT_TRUE(file_util::CopyDirectory(file_name_from, file_name_to, true)); in TEST_F()
1124 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
1132 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1138 ASSERT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
1140 EXPECT_TRUE(file_util::CopyDirectory(file_name_from, file_name_to, true)); in TEST_F()
1143 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
1152 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1157 file_util::CreateDirectory(dir_name_to); in TEST_F()
1158 ASSERT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
1162 EXPECT_TRUE(file_util::CopyDirectory(file_name_from, dir_name_to, true)); in TEST_F()
1165 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
1172 file_util::CreateDirectory(dir_name_from); in TEST_F()
1173 ASSERT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
1180 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1184 ASSERT_TRUE(file_util::CopyFile(file_name_from, dest_file)); in TEST_F()
1190 ASSERT_TRUE(file_util::CopyFile(file_name_from, dest_file2)); in TEST_F()
1197 EXPECT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1198 EXPECT_TRUE(file_util::PathExists(dest_file)); in TEST_F()
1201 EXPECT_TRUE(file_util::PathExists(dest_file2_test)); in TEST_F()
1202 EXPECT_TRUE(file_util::PathExists(dest_file2)); in TEST_F()
1219 file_util::GetFileCreationLocalTime(file_name.value(), &file_creation_time); in TEST_F()
1250 ASSERT_TRUE(file_util::PathExists(data_dir)); in TEST_F()
1277 EXPECT_TRUE(file_util::ContentsEqual(original_file, original_file)); in TEST_F()
1278 EXPECT_TRUE(file_util::ContentsEqual(original_file, same_file)); in TEST_F()
1279 EXPECT_FALSE(file_util::ContentsEqual(original_file, same_length_file)); in TEST_F()
1280 EXPECT_FALSE(file_util::ContentsEqual(original_file, different_file)); in TEST_F()
1281 EXPECT_FALSE(file_util::ContentsEqual( in TEST_F()
1284 EXPECT_FALSE(file_util::ContentsEqual(original_file, different_first_file)); in TEST_F()
1285 EXPECT_FALSE(file_util::ContentsEqual(original_file, different_last_file)); in TEST_F()
1286 EXPECT_TRUE(file_util::ContentsEqual(empty1_file, empty2_file)); in TEST_F()
1287 EXPECT_FALSE(file_util::ContentsEqual(original_file, shortened_file)); in TEST_F()
1288 EXPECT_FALSE(file_util::ContentsEqual(shortened_file, original_file)); in TEST_F()
1289 EXPECT_TRUE(file_util::ContentsEqual(binary_file, binary_file_same)); in TEST_F()
1290 EXPECT_FALSE(file_util::ContentsEqual(binary_file, binary_file_diff)); in TEST_F()
1299 ASSERT_TRUE(file_util::PathExists(data_dir)); in TEST_F()
1328 EXPECT_TRUE(file_util::TextContentsEqual(original_file, same_file)); in TEST_F()
1329 EXPECT_TRUE(file_util::TextContentsEqual(original_file, crlf_file)); in TEST_F()
1330 EXPECT_FALSE(file_util::TextContentsEqual(original_file, shortened_file)); in TEST_F()
1331 EXPECT_FALSE(file_util::TextContentsEqual(original_file, different_file)); in TEST_F()
1332 EXPECT_FALSE(file_util::TextContentsEqual(original_file, in TEST_F()
1334 EXPECT_FALSE(file_util::TextContentsEqual(original_file, in TEST_F()
1336 EXPECT_FALSE(file_util::TextContentsEqual(first1_file, first2_file)); in TEST_F()
1337 EXPECT_TRUE(file_util::TextContentsEqual(empty1_file, empty2_file)); in TEST_F()
1338 EXPECT_FALSE(file_util::TextContentsEqual(original_file, empty1_file)); in TEST_F()
1339 EXPECT_TRUE(file_util::TextContentsEqual(blank_line_file, in TEST_F()
1376 is_solved = file_util::ResolveShortcut(&link_file); in TEST_F()
1396 EXPECT_TRUE(file_util::CreateShortcutLink(target_file.value().c_str(), in TEST_F()
1400 EXPECT_TRUE(file_util::ResolveShortcut(&resolved_name)); in TEST_F()
1413 file_util::CreateDirectory(dir_name_from); in TEST_F()
1414 ASSERT_TRUE(file_util::PathExists(dir_name_from)); in TEST_F()
1420 ASSERT_TRUE(file_util::PathExists(file_name_from)); in TEST_F()
1428 ASSERT_FALSE(file_util::PathExists(dir_name_to)); in TEST_F()
1430 EXPECT_TRUE(file_util::CopyAndDeleteDirectory(dir_name_from, dir_name_to)); in TEST_F()
1433 EXPECT_FALSE(file_util::PathExists(dir_name_from)); in TEST_F()
1434 EXPECT_FALSE(file_util::PathExists(file_name_from)); in TEST_F()
1435 EXPECT_TRUE(file_util::PathExists(dir_name_to)); in TEST_F()
1436 EXPECT_TRUE(file_util::PathExists(file_name_to)); in TEST_F()
1453 file_util::GetTempDir(&path); in TEST_F()
1471 ASSERT_TRUE(file_util::CreateTemporaryFile(&(temp_files[i]))); in TEST_F()
1472 EXPECT_TRUE(file_util::PathExists(temp_files[i])); in TEST_F()
1473 EXPECT_FALSE(file_util::DirectoryExists(temp_files[i])); in TEST_F()
1478 EXPECT_TRUE(file_util::Delete(temp_files[i], false)); in TEST_F()
1488 fps[i] = file_util::CreateAndOpenTemporaryFile(&(names[i])); in TEST_F()
1490 EXPECT_TRUE(file_util::PathExists(names[i])); in TEST_F()
1500 EXPECT_TRUE(file_util::CloseFile(fps[i])); in TEST_F()
1501 EXPECT_TRUE(file_util::Delete(names[i], false)); in TEST_F()
1507 ASSERT_TRUE(file_util::CreateNewTempDirectory(FilePath::StringType(), in TEST_F()
1509 EXPECT_TRUE(file_util::PathExists(temp_dir)); in TEST_F()
1510 EXPECT_TRUE(file_util::Delete(temp_dir, false)); in TEST_F()
1515 ASSERT_TRUE(file_util::CreateTemporaryDirInDir( in TEST_F()
1519 EXPECT_TRUE(file_util::PathExists(new_dir)); in TEST_F()
1521 EXPECT_TRUE(file_util::Delete(new_dir, false)); in TEST_F()
1526 EXPECT_TRUE(file_util::GetShmemTempDir(&dir)); in TEST_F()
1527 EXPECT_TRUE(file_util::DirectoryExists(dir)); in TEST_F()
1541 EXPECT_FALSE(file_util::PathExists(test_path)); in TEST_F()
1542 EXPECT_TRUE(file_util::CreateDirectory(test_path)); in TEST_F()
1543 EXPECT_TRUE(file_util::PathExists(test_path)); in TEST_F()
1545 EXPECT_TRUE(file_util::CreateDirectory(test_path)); in TEST_F()
1549 EXPECT_FALSE(file_util::PathExists(test_path)); in TEST_F()
1551 EXPECT_TRUE(file_util::PathExists(test_path)); in TEST_F()
1552 EXPECT_FALSE(file_util::CreateDirectory(test_path)); in TEST_F()
1554 EXPECT_TRUE(file_util::Delete(test_root, true)); in TEST_F()
1555 EXPECT_FALSE(file_util::PathExists(test_root)); in TEST_F()
1556 EXPECT_FALSE(file_util::PathExists(test_path)); in TEST_F()
1561 ASSERT_TRUE(file_util::DirectoryExists( in TEST_F()
1567 ASSERT_TRUE(file_util::DirectoryExists(top_level)); in TEST_F()
1571 EXPECT_TRUE(file_util::CreateDirectory( in TEST_F()
1573 EXPECT_TRUE(file_util::CreateDirectory(top_level)); in TEST_F()
1579 if (!file_util::PathExists(invalid_drive)) { in TEST_F()
1580 EXPECT_FALSE(file_util::CreateDirectory(invalid_path)); in TEST_F()
1589 EXPECT_FALSE(file_util::PathExists(test_root)); in TEST_F()
1590 EXPECT_TRUE(file_util::CreateDirectory(test_root)); in TEST_F()
1591 EXPECT_TRUE(file_util::PathExists(test_root)); in TEST_F()
1592 EXPECT_TRUE(file_util::DirectoryExists(test_root)); in TEST_F()
1597 EXPECT_FALSE(file_util::PathExists(test_path)); in TEST_F()
1599 EXPECT_TRUE(file_util::PathExists(test_path)); in TEST_F()
1600 EXPECT_FALSE(file_util::DirectoryExists(test_path)); in TEST_F()
1601 EXPECT_TRUE(file_util::Delete(test_path, false)); in TEST_F()
1603 EXPECT_TRUE(file_util::Delete(test_root, true)); in TEST_F()
1608 file_util::FileEnumerator f0(temp_dir_.path(), true, FILES_AND_DIRECTORIES); in TEST_F()
1613 file_util::FileEnumerator f0_dotdot(temp_dir_.path(), false, in TEST_F()
1614 static_cast<file_util::FileEnumerator::FILE_TYPE>( in TEST_F()
1615 FILES_AND_DIRECTORIES | file_util::FileEnumerator::INCLUDE_DOT_DOT)); in TEST_F()
1623 EXPECT_TRUE(file_util::CreateDirectory(dir1)); in TEST_F()
1625 EXPECT_TRUE(file_util::CreateDirectory(dir2)); in TEST_F()
1627 EXPECT_TRUE(file_util::CreateDirectory(dir2inner)); in TEST_F()
1643 file_util::FileEnumerator f1(temp_dir_.path(), true, in TEST_F()
1644 file_util::FileEnumerator::FILES); in TEST_F()
1653 file_util::FileEnumerator f2(temp_dir_.path(), true, in TEST_F()
1654 file_util::FileEnumerator::DIRECTORIES); in TEST_F()
1662 file_util::FileEnumerator f2_non_recursive( in TEST_F()
1663 temp_dir_.path(), false, file_util::FileEnumerator::DIRECTORIES); in TEST_F()
1670 file_util::FileEnumerator f2_dotdot( in TEST_F()
1672 static_cast<file_util::FileEnumerator::FILE_TYPE>( in TEST_F()
1673 file_util::FileEnumerator::DIRECTORIES | in TEST_F()
1674 file_util::FileEnumerator::INCLUDE_DOT_DOT)); in TEST_F()
1683 file_util::FileEnumerator f3(temp_dir_.path(), true, FILES_AND_DIRECTORIES); in TEST_F()
1695 file_util::FileEnumerator f4(temp_dir_.path(), false, FILES_AND_DIRECTORIES); in TEST_F()
1704 file_util::FileEnumerator f5(temp_dir_.path(), true, FILES_AND_DIRECTORIES, in TEST_F()
1716 file_util::FileEnumerator f6(temp_dir_.path(), true, FILES_AND_DIRECTORIES); in TEST_F()
1726 if (file_util::PathExists(data_dir)) { in TEST_F()
1727 ASSERT_TRUE(file_util::Delete(data_dir, true)); in TEST_F()
1729 ASSERT_TRUE(file_util::CreateDirectory(data_dir)); in TEST_F()
1738 ASSERT_TRUE(file_util::CreateDirectory(foo)); in TEST_F()
1740 ASSERT_TRUE(file_util::WriteFile(bar, data.c_str(), data.length())); in TEST_F()
1741 ASSERT_TRUE(file_util::WriteFile(baz, data.c_str(), data.length())); in TEST_F()
1742 ASSERT_TRUE(file_util::WriteFile(foobar, data.c_str(), data.length())); in TEST_F()
1744 EXPECT_TRUE(file_util::ContainsPath(foo, bar)); in TEST_F()
1745 EXPECT_FALSE(file_util::ContainsPath(foo, baz)); in TEST_F()
1746 EXPECT_FALSE(file_util::ContainsPath(foo, foobar)); in TEST_F()
1747 EXPECT_FALSE(file_util::ContainsPath(foo, foo)); in TEST_F()
1752 EXPECT_TRUE(file_util::ContainsPath(foo, in TEST_F()
1754 EXPECT_TRUE(file_util::ContainsPath(foo, in TEST_F()
1760 EXPECT_FALSE(file_util::ContainsPath(foo, in TEST_F()
1770 if (file_util::PathExists(data_dir)) { in TEST_F()
1771 ASSERT_TRUE(file_util::Delete(data_dir, true)); in TEST_F()
1773 ASSERT_TRUE(file_util::CreateDirectory(data_dir)); in TEST_F()
1777 ASSERT_TRUE(file_util::WriteFile(foobar, data.c_str(), data.length())); in TEST_F()
1791 ASSERT_TRUE(file_util::TouchFile(foobar, access_time, modification_time)); in TEST_F()
1793 ASSERT_TRUE(file_util::GetFileInfo(foobar, &file_info)); in TEST_F()
1803 ASSERT_FALSE(file_util::PathExists(empty_dir)); in TEST_F()
1805 ASSERT_TRUE(file_util::CreateDirectory(empty_dir)); in TEST_F()
1807 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir)); in TEST_F()
1811 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length())); in TEST_F()
1813 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir)); in TEST_F()