| Index: base/file_util_unittest.cc
|
| diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
|
| index 2dac48470180a72fda1eecb945aa332330ab7e3a..9289438d07706ad254a3933a79e71ace9ae9f0df 100644
|
| --- a/base/file_util_unittest.cc
|
| +++ b/base/file_util_unittest.cc
|
| @@ -254,7 +254,7 @@ TEST_F(FileUtilTest, FileAndDirectorySize) {
|
| EXPECT_EQ(20ll, size_f1);
|
|
|
| FilePath subdir_path = temp_dir_.path().Append(FPL("Level2"));
|
| - file_util::CreateDirectory(subdir_path);
|
| + base::CreateDirectory(subdir_path);
|
|
|
| FilePath file_02 = subdir_path.Append(FPL("The file 02.txt"));
|
| CreateTextFile(file_02, L"123456789012345678901234567890");
|
| @@ -263,7 +263,7 @@ TEST_F(FileUtilTest, FileAndDirectorySize) {
|
| EXPECT_EQ(30ll, size_f2);
|
|
|
| FilePath subsubdir_path = subdir_path.Append(FPL("Level3"));
|
| - file_util::CreateDirectory(subsubdir_path);
|
| + base::CreateDirectory(subsubdir_path);
|
|
|
| FilePath file_03 = subsubdir_path.Append(FPL("The file 03.txt"));
|
| CreateTextFile(file_03, L"123");
|
| @@ -278,7 +278,7 @@ TEST_F(FileUtilTest, NormalizeFilePathBasic) {
|
| FilePath file_a_path = temp_dir_.path().Append(FPL("file_a"));
|
| FilePath dir_path = temp_dir_.path().Append(FPL("dir"));
|
| FilePath file_b_path = dir_path.Append(FPL("file_b"));
|
| - file_util::CreateDirectory(dir_path);
|
| + base::CreateDirectory(dir_path);
|
|
|
| FilePath normalized_file_a_path, normalized_file_b_path;
|
| ASSERT_FALSE(PathExists(file_a_path));
|
| @@ -321,10 +321,10 @@ TEST_F(FileUtilTest, NormalizeFilePathReparsePoints) {
|
| // |-> to_sub_long (reparse point to temp_dir\sub_a\long_name_\sub_long)
|
|
|
| FilePath base_a = temp_dir_.path().Append(FPL("base_a"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(base_a));
|
| + ASSERT_TRUE(base::CreateDirectory(base_a));
|
|
|
| FilePath sub_a = base_a.Append(FPL("sub_a"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(sub_a));
|
| + ASSERT_TRUE(base::CreateDirectory(sub_a));
|
|
|
| FilePath file_txt = sub_a.Append(FPL("file.txt"));
|
| CreateTextFile(file_txt, bogus_content);
|
| @@ -352,26 +352,26 @@ TEST_F(FileUtilTest, NormalizeFilePathReparsePoints) {
|
| ASSERT_EQ(MAX_PATH - kCreateDirLimit, deep_file.value().length());
|
|
|
| FilePath sub_long = deep_file.DirName();
|
| - ASSERT_TRUE(file_util::CreateDirectory(sub_long));
|
| + ASSERT_TRUE(base::CreateDirectory(sub_long));
|
| CreateTextFile(deep_file, bogus_content);
|
|
|
| FilePath base_b = temp_dir_.path().Append(FPL("base_b"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(base_b));
|
| + ASSERT_TRUE(base::CreateDirectory(base_b));
|
|
|
| FilePath to_sub_a = base_b.Append(FPL("to_sub_a"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(to_sub_a));
|
| + ASSERT_TRUE(base::CreateDirectory(to_sub_a));
|
| FilePath normalized_path;
|
| {
|
| ReparsePoint reparse_to_sub_a(to_sub_a, sub_a);
|
| ASSERT_TRUE(reparse_to_sub_a.IsValid());
|
|
|
| FilePath to_base_b = base_b.Append(FPL("to_base_b"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(to_base_b));
|
| + ASSERT_TRUE(base::CreateDirectory(to_base_b));
|
| ReparsePoint reparse_to_base_b(to_base_b, base_b);
|
| ASSERT_TRUE(reparse_to_base_b.IsValid());
|
|
|
| FilePath to_sub_long = base_b.Append(FPL("to_sub_long"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(to_sub_long));
|
| + ASSERT_TRUE(base::CreateDirectory(to_sub_long));
|
| ReparsePoint reparse_to_sub_long(to_sub_long, sub_long);
|
| ASSERT_TRUE(reparse_to_sub_long.IsValid());
|
|
|
| @@ -492,7 +492,7 @@ TEST_F(FileUtilTest, DevicePathToDriveLetter) {
|
|
|
| TEST_F(FileUtilTest, GetPlatformFileInfoForDirectory) {
|
| FilePath empty_dir = temp_dir_.path().Append(FPL("gpfi_test"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(empty_dir));
|
| + ASSERT_TRUE(base::CreateDirectory(empty_dir));
|
| win::ScopedHandle dir(
|
| ::CreateFile(empty_dir.value().c_str(),
|
| FILE_ALL_ACCESS,
|
| @@ -518,7 +518,7 @@ TEST_F(FileUtilTest, CreateTemporaryFileInDirLongPathTest) {
|
| const FilePath::CharType kLongDirName[] = FPL("A long path");
|
| const FilePath::CharType kTestSubDirName[] = FPL("test");
|
| FilePath long_test_dir = temp_dir_.path().Append(kLongDirName);
|
| - ASSERT_TRUE(file_util::CreateDirectory(long_test_dir));
|
| + ASSERT_TRUE(base::CreateDirectory(long_test_dir));
|
|
|
| // kLongDirName is not a 8.3 component. So GetShortName() should give us a
|
| // different short name.
|
| @@ -543,7 +543,7 @@ TEST_F(FileUtilTest, CreateTemporaryFileInDirLongPathTest) {
|
| // directories. (Note that this assumption is true for NTFS, but not for some
|
| // network file systems. E.g. AFS).
|
| FilePath access_test_dir = long_test_dir.Append(kTestSubDirName);
|
| - ASSERT_TRUE(file_util::CreateDirectory(access_test_dir));
|
| + ASSERT_TRUE(base::CreateDirectory(access_test_dir));
|
| file_util::PermissionRestorer long_test_dir_restorer(long_test_dir);
|
| ASSERT_TRUE(file_util::MakeFileUnreadable(long_test_dir));
|
|
|
| @@ -583,7 +583,7 @@ TEST_F(FileUtilTest, CreateAndReadSymlinks) {
|
| // Link to a directory.
|
| link_from = temp_dir_.path().Append(FPL("from_dir"));
|
| link_to = temp_dir_.path().Append(FPL("to_dir"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(link_to));
|
| + ASSERT_TRUE(base::CreateDirectory(link_to));
|
| ASSERT_TRUE(CreateSymbolicLink(link_to, link_from))
|
| << "Failed to create directory symlink.";
|
|
|
| @@ -618,7 +618,7 @@ TEST_F(FileUtilTest, NormalizeFilePathSymlinks) {
|
| // Link to a directory.
|
| link_from = temp_dir_.path().Append(FPL("from_dir"));
|
| link_to = temp_dir_.path().Append(FPL("to_dir"));
|
| - ASSERT_TRUE(file_util::CreateDirectory(link_to));
|
| + ASSERT_TRUE(base::CreateDirectory(link_to));
|
| ASSERT_TRUE(CreateSymbolicLink(link_to, link_from))
|
| << "Failed to create directory symlink.";
|
|
|
| @@ -797,7 +797,7 @@ TEST_F(FileUtilTest, ChangeDirectoryPermissionsAndEnumerate) {
|
| // Create a directory path.
|
| FilePath subdir_path =
|
| temp_dir_.path().Append(FPL("PermissionTest1"));
|
| - file_util::CreateDirectory(subdir_path);
|
| + base::CreateDirectory(subdir_path);
|
| ASSERT_TRUE(PathExists(subdir_path));
|
|
|
| // Create a dummy file to enumerate.
|
| @@ -854,7 +854,7 @@ TEST_F(FileUtilTest, DeleteWildCard) {
|
| ASSERT_TRUE(PathExists(file_name));
|
|
|
| FilePath subdir_path = temp_dir_.path().Append(FPL("DeleteWildCardDir"));
|
| - file_util::CreateDirectory(subdir_path);
|
| + base::CreateDirectory(subdir_path);
|
| ASSERT_TRUE(PathExists(subdir_path));
|
|
|
| // Create the wildcard path
|
| @@ -877,7 +877,7 @@ TEST_F(FileUtilTest, DeleteNonExistantWildCard) {
|
| // Create a file and a directory
|
| FilePath subdir_path =
|
| temp_dir_.path().Append(FPL("DeleteNonExistantWildCard"));
|
| - file_util::CreateDirectory(subdir_path);
|
| + base::CreateDirectory(subdir_path);
|
| ASSERT_TRUE(PathExists(subdir_path));
|
|
|
| // Create the wildcard path
|
| @@ -898,7 +898,7 @@ TEST_F(FileUtilTest, DeleteNonExistantWildCard) {
|
| TEST_F(FileUtilTest, DeleteDirNonRecursive) {
|
| // Create a subdirectory and put a file and two directories inside.
|
| FilePath test_subdir = temp_dir_.path().Append(FPL("DeleteDirNonRecursive"));
|
| - file_util::CreateDirectory(test_subdir);
|
| + base::CreateDirectory(test_subdir);
|
| ASSERT_TRUE(PathExists(test_subdir));
|
|
|
| FilePath file_name = test_subdir.Append(FPL("Test DeleteDir.txt"));
|
| @@ -906,11 +906,11 @@ TEST_F(FileUtilTest, DeleteDirNonRecursive) {
|
| ASSERT_TRUE(PathExists(file_name));
|
|
|
| FilePath subdir_path1 = test_subdir.Append(FPL("TestSubDir1"));
|
| - file_util::CreateDirectory(subdir_path1);
|
| + base::CreateDirectory(subdir_path1);
|
| ASSERT_TRUE(PathExists(subdir_path1));
|
|
|
| FilePath subdir_path2 = test_subdir.Append(FPL("TestSubDir2"));
|
| - file_util::CreateDirectory(subdir_path2);
|
| + base::CreateDirectory(subdir_path2);
|
| ASSERT_TRUE(PathExists(subdir_path2));
|
|
|
| // Delete non-recursively and check that the empty dir got deleted
|
| @@ -928,7 +928,7 @@ TEST_F(FileUtilTest, DeleteDirNonRecursive) {
|
| TEST_F(FileUtilTest, DeleteDirRecursive) {
|
| // Create a subdirectory and put a file and two directories inside.
|
| FilePath test_subdir = temp_dir_.path().Append(FPL("DeleteDirRecursive"));
|
| - file_util::CreateDirectory(test_subdir);
|
| + base::CreateDirectory(test_subdir);
|
| ASSERT_TRUE(PathExists(test_subdir));
|
|
|
| FilePath file_name = test_subdir.Append(FPL("Test DeleteDirRecursive.txt"));
|
| @@ -936,11 +936,11 @@ TEST_F(FileUtilTest, DeleteDirRecursive) {
|
| ASSERT_TRUE(PathExists(file_name));
|
|
|
| FilePath subdir_path1 = test_subdir.Append(FPL("TestSubDir1"));
|
| - file_util::CreateDirectory(subdir_path1);
|
| + base::CreateDirectory(subdir_path1);
|
| ASSERT_TRUE(PathExists(subdir_path1));
|
|
|
| FilePath subdir_path2 = test_subdir.Append(FPL("TestSubDir2"));
|
| - file_util::CreateDirectory(subdir_path2);
|
| + base::CreateDirectory(subdir_path2);
|
| ASSERT_TRUE(PathExists(subdir_path2));
|
|
|
| // Delete recursively and check that the empty dir got deleted
|
| @@ -1004,7 +1004,7 @@ TEST_F(FileUtilTest, MoveFileDirExists) {
|
| // The destination directory
|
| FilePath dir_name_to =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Destination"));
|
| - file_util::CreateDirectory(dir_name_to);
|
| + base::CreateDirectory(dir_name_to);
|
| ASSERT_TRUE(PathExists(dir_name_to));
|
|
|
| EXPECT_FALSE(Move(file_name_from, dir_name_to));
|
| @@ -1015,7 +1015,7 @@ TEST_F(FileUtilTest, MoveNew) {
|
| // Create a directory
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Move_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory
|
| @@ -1056,7 +1056,7 @@ TEST_F(FileUtilTest, MoveExist) {
|
| // Create a directory
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Move_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory
|
| @@ -1075,7 +1075,7 @@ TEST_F(FileUtilTest, MoveExist) {
|
| dir_name_to.Append(FILE_PATH_LITERAL("Move_Test_File.txt"));
|
|
|
| // Create the destination directory.
|
| - file_util::CreateDirectory(dir_name_exists);
|
| + base::CreateDirectory(dir_name_exists);
|
| ASSERT_TRUE(PathExists(dir_name_exists));
|
|
|
| EXPECT_TRUE(Move(dir_name_from, dir_name_to));
|
| @@ -1091,7 +1091,7 @@ TEST_F(FileUtilTest, CopyDirectoryRecursivelyNew) {
|
| // Create a directory.
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory.
|
| @@ -1103,7 +1103,7 @@ TEST_F(FileUtilTest, CopyDirectoryRecursivelyNew) {
|
| // Create a subdirectory.
|
| FilePath subdir_name_from =
|
| dir_name_from.Append(FILE_PATH_LITERAL("Subdir"));
|
| - file_util::CreateDirectory(subdir_name_from);
|
| + base::CreateDirectory(subdir_name_from);
|
| ASSERT_TRUE(PathExists(subdir_name_from));
|
|
|
| // Create a file under the subdirectory.
|
| @@ -1141,7 +1141,7 @@ TEST_F(FileUtilTest, CopyDirectoryRecursivelyExists) {
|
| // Create a directory.
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory.
|
| @@ -1153,7 +1153,7 @@ TEST_F(FileUtilTest, CopyDirectoryRecursivelyExists) {
|
| // Create a subdirectory.
|
| FilePath subdir_name_from =
|
| dir_name_from.Append(FILE_PATH_LITERAL("Subdir"));
|
| - file_util::CreateDirectory(subdir_name_from);
|
| + base::CreateDirectory(subdir_name_from);
|
| ASSERT_TRUE(PathExists(subdir_name_from));
|
|
|
| // Create a file under the subdirectory.
|
| @@ -1176,7 +1176,7 @@ TEST_F(FileUtilTest, CopyDirectoryRecursivelyExists) {
|
| subdir_name_to.Append(FILE_PATH_LITERAL("Copy_Test_File.txt"));
|
|
|
| // Create the destination directory.
|
| - file_util::CreateDirectory(dir_name_exists);
|
| + base::CreateDirectory(dir_name_exists);
|
| ASSERT_TRUE(PathExists(dir_name_exists));
|
|
|
| EXPECT_TRUE(CopyDirectory(dir_name_from, dir_name_exists, true));
|
| @@ -1196,7 +1196,7 @@ TEST_F(FileUtilTest, CopyDirectoryNew) {
|
| // Create a directory.
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory.
|
| @@ -1208,7 +1208,7 @@ TEST_F(FileUtilTest, CopyDirectoryNew) {
|
| // Create a subdirectory.
|
| FilePath subdir_name_from =
|
| dir_name_from.Append(FILE_PATH_LITERAL("Subdir"));
|
| - file_util::CreateDirectory(subdir_name_from);
|
| + base::CreateDirectory(subdir_name_from);
|
| ASSERT_TRUE(PathExists(subdir_name_from));
|
|
|
| // Create a file under the subdirectory.
|
| @@ -1243,7 +1243,7 @@ TEST_F(FileUtilTest, CopyDirectoryExists) {
|
| // Create a directory.
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory.
|
| @@ -1255,7 +1255,7 @@ TEST_F(FileUtilTest, CopyDirectoryExists) {
|
| // Create a subdirectory.
|
| FilePath subdir_name_from =
|
| dir_name_from.Append(FILE_PATH_LITERAL("Subdir"));
|
| - file_util::CreateDirectory(subdir_name_from);
|
| + base::CreateDirectory(subdir_name_from);
|
| ASSERT_TRUE(PathExists(subdir_name_from));
|
|
|
| // Create a file under the subdirectory.
|
| @@ -1273,7 +1273,7 @@ TEST_F(FileUtilTest, CopyDirectoryExists) {
|
| dir_name_to.Append(FILE_PATH_LITERAL("Subdir"));
|
|
|
| // Create the destination directory.
|
| - file_util::CreateDirectory(dir_name_to);
|
| + base::CreateDirectory(dir_name_to);
|
| ASSERT_TRUE(PathExists(dir_name_to));
|
|
|
| EXPECT_TRUE(CopyDirectory(dir_name_from, dir_name_to, false));
|
| @@ -1336,7 +1336,7 @@ TEST_F(FileUtilTest, CopyFileWithCopyDirectoryRecursiveToExistingDirectory) {
|
| // The destination
|
| FilePath dir_name_to =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Destination"));
|
| - file_util::CreateDirectory(dir_name_to);
|
| + base::CreateDirectory(dir_name_to);
|
| ASSERT_TRUE(PathExists(dir_name_to));
|
| FilePath file_name_to =
|
| dir_name_to.Append(FILE_PATH_LITERAL("Copy_Test_File.txt"));
|
| @@ -1351,7 +1351,7 @@ TEST_F(FileUtilTest, CopyDirectoryWithTrailingSeparators) {
|
| // Create a directory.
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory.
|
| @@ -1388,7 +1388,7 @@ TEST_F(FileUtilTest, CopyFile) {
|
| // Create a directory
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory
|
| @@ -1523,7 +1523,7 @@ TEST_F(FileUtilTest, CopyAndDeleteDirectoryTest) {
|
| // Create a directory
|
| FilePath dir_name_from =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("CopyAndDelete_From_Subdir"));
|
| - file_util::CreateDirectory(dir_name_from);
|
| + base::CreateDirectory(dir_name_from);
|
| ASSERT_TRUE(PathExists(dir_name_from));
|
|
|
| // Create a file under the directory
|
| @@ -1652,17 +1652,17 @@ TEST_F(FileUtilTest, CreateDirectoryTest) {
|
| #endif
|
|
|
| EXPECT_FALSE(PathExists(test_path));
|
| - EXPECT_TRUE(file_util::CreateDirectory(test_path));
|
| + EXPECT_TRUE(base::CreateDirectory(test_path));
|
| EXPECT_TRUE(PathExists(test_path));
|
| // CreateDirectory returns true if the DirectoryExists returns true.
|
| - EXPECT_TRUE(file_util::CreateDirectory(test_path));
|
| + EXPECT_TRUE(base::CreateDirectory(test_path));
|
|
|
| // Doesn't work to create it on top of a non-dir
|
| test_path = test_path.Append(FILE_PATH_LITERAL("foobar.txt"));
|
| EXPECT_FALSE(PathExists(test_path));
|
| CreateTextFile(test_path, L"test file");
|
| EXPECT_TRUE(PathExists(test_path));
|
| - EXPECT_FALSE(file_util::CreateDirectory(test_path));
|
| + EXPECT_FALSE(base::CreateDirectory(test_path));
|
|
|
| EXPECT_TRUE(DeleteFile(test_root, true));
|
| EXPECT_FALSE(PathExists(test_root));
|
| @@ -1680,16 +1680,16 @@ TEST_F(FileUtilTest, CreateDirectoryTest) {
|
|
|
| // Given these assumptions hold, it should be safe to
|
| // test that "creating" these directories succeeds.
|
| - EXPECT_TRUE(file_util::CreateDirectory(
|
| + EXPECT_TRUE(base::CreateDirectory(
|
| FilePath(FilePath::kCurrentDirectory)));
|
| - EXPECT_TRUE(file_util::CreateDirectory(top_level));
|
| + EXPECT_TRUE(base::CreateDirectory(top_level));
|
|
|
| #if defined(OS_WIN)
|
| FilePath invalid_drive(FILE_PATH_LITERAL("o:\\"));
|
| FilePath invalid_path =
|
| invalid_drive.Append(FILE_PATH_LITERAL("some\\inaccessible\\dir"));
|
| if (!PathExists(invalid_drive)) {
|
| - EXPECT_FALSE(file_util::CreateDirectory(invalid_path));
|
| + EXPECT_FALSE(base::CreateDirectory(invalid_path));
|
| }
|
| #endif
|
| }
|
| @@ -1699,7 +1699,7 @@ TEST_F(FileUtilTest, DetectDirectoryTest) {
|
| FilePath test_root =
|
| temp_dir_.path().Append(FILE_PATH_LITERAL("detect_directory_test"));
|
| EXPECT_FALSE(PathExists(test_root));
|
| - EXPECT_TRUE(file_util::CreateDirectory(test_root));
|
| + EXPECT_TRUE(base::CreateDirectory(test_root));
|
| EXPECT_TRUE(PathExists(test_root));
|
| EXPECT_TRUE(DirectoryExists(test_root));
|
| // Check a file
|
| @@ -1729,11 +1729,11 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
|
|
|
| // create the directories
|
| FilePath dir1 = temp_dir_.path().Append(FPL("dir1"));
|
| - EXPECT_TRUE(file_util::CreateDirectory(dir1));
|
| + EXPECT_TRUE(base::CreateDirectory(dir1));
|
| FilePath dir2 = temp_dir_.path().Append(FPL("dir2"));
|
| - EXPECT_TRUE(file_util::CreateDirectory(dir2));
|
| + EXPECT_TRUE(base::CreateDirectory(dir2));
|
| FilePath dir2inner = dir2.Append(FPL("inner"));
|
| - EXPECT_TRUE(file_util::CreateDirectory(dir2inner));
|
| + EXPECT_TRUE(base::CreateDirectory(dir2inner));
|
|
|
| // create the files
|
| FilePath dir2file = dir2.Append(FPL("dir2file.txt"));
|
| @@ -1870,13 +1870,13 @@ TEST_F(FileUtilTest, AppendToFile) {
|
| if (PathExists(data_dir)) {
|
| ASSERT_TRUE(DeleteFile(data_dir, true));
|
| }
|
| - ASSERT_TRUE(file_util::CreateDirectory(data_dir));
|
| + ASSERT_TRUE(base::CreateDirectory(data_dir));
|
|
|
| // Create a fresh, empty copy of this directory.
|
| if (PathExists(data_dir)) {
|
| ASSERT_TRUE(DeleteFile(data_dir, true));
|
| }
|
| - ASSERT_TRUE(file_util::CreateDirectory(data_dir));
|
| + ASSERT_TRUE(base::CreateDirectory(data_dir));
|
| FilePath foobar(data_dir.Append(FILE_PATH_LITERAL("foobar.txt")));
|
|
|
| std::string data("hello");
|
| @@ -1898,7 +1898,7 @@ TEST_F(FileUtilTest, TouchFile) {
|
| if (PathExists(data_dir)) {
|
| ASSERT_TRUE(DeleteFile(data_dir, true));
|
| }
|
| - ASSERT_TRUE(file_util::CreateDirectory(data_dir));
|
| + ASSERT_TRUE(base::CreateDirectory(data_dir));
|
|
|
| FilePath foobar(data_dir.Append(FILE_PATH_LITERAL("foobar.txt")));
|
| std::string data("hello");
|
| @@ -1930,7 +1930,7 @@ TEST_F(FileUtilTest, IsDirectoryEmpty) {
|
|
|
| ASSERT_FALSE(PathExists(empty_dir));
|
|
|
| - ASSERT_TRUE(file_util::CreateDirectory(empty_dir));
|
| + ASSERT_TRUE(base::CreateDirectory(empty_dir));
|
|
|
| EXPECT_TRUE(base::IsDirectoryEmpty(empty_dir));
|
|
|
| @@ -1962,10 +1962,10 @@ class VerifyPathControlledByUserTest : public FileUtilTest {
|
| // |-> text_file_
|
|
|
| base_dir_ = temp_dir_.path().AppendASCII("base_dir");
|
| - ASSERT_TRUE(file_util::CreateDirectory(base_dir_));
|
| + ASSERT_TRUE(base::CreateDirectory(base_dir_));
|
|
|
| sub_dir_ = base_dir_.AppendASCII("sub_dir");
|
| - ASSERT_TRUE(file_util::CreateDirectory(sub_dir_));
|
| + ASSERT_TRUE(base::CreateDirectory(sub_dir_));
|
|
|
| text_file_ = sub_dir_.AppendASCII("file.txt");
|
| CreateTextFile(text_file_, L"This text file has some text in it.");
|
|
|