Lines Matching refs:FILE
3 // found in the LICENSE file.
132 // Collects all the results from the given file enumerator, and provides an
133 // interface to query whether a given file is present.
140 // The file should not be returned twice.
142 << "Same file returned twice";
149 // Returns true if the enumerator found the file.
150 bool HasFile(const FilePath& file) const {
151 return files_.find(file.value()) != files_.end();
162 // Simple function to dump some text into a new file.
165 std::wofstream file;
166 file.open(filename.value().c_str());
167 ASSERT_TRUE(file.is_open());
168 file << contents;
169 file.close();
172 // Simple function to take out some text from a file.
175 std::wifstream file;
176 file.open(filename.value().c_str());
177 EXPECT_TRUE(file.is_open());
178 file.getline(contents, arraysize(contents));
179 file.close();
257 // Test finding the file type from a path name
323 // Create old file (that we don't want to count)
325 temp_dir_.path().Append(FILE_PATH_LITERAL("Old File.txt"));
333 // file creation time is one second.
341 // Create a new file (that we do want to count)
343 temp_dir_.path().Append(FILE_PATH_LITERAL("New File.txt"));
346 // We should see only the new file.
349 // Delete new file, we should see no files after cutoff now
357 FilePath file_01 = temp_dir_.path().Append(FPL("The file 01.txt"));
366 FilePath file_02 = subdir_path.Append(FPL("The file 02.txt"));
375 FilePath file_03 = subsubdir_path.Append(FPL("The file 03.txt"));
382 file_util::ComputeFilesSize(temp_dir_.path(), FPL("The file*"));
414 // or junction. So, the real path of the directory holding file a
415 // must be the parent of the path holding file b.
428 // | |-> file.txt
443 FilePath file_txt = sub_a.Append(FPL("file.txt"));
446 // Want a directory whose name is long enough to make the path to the file
514 // Normalize a junction free path: base_a\sub_a\file.txt .
519 // Check that the path base_b\to_sub_a\file.txt can be normalized to exclude
521 ASSERT_TRUE(file_util::NormalizeFilePath(to_sub_a.Append(FPL("file.txt")),
525 // Check that the path base_b\to_base_b\to_base_b\to_sub_a\file.txt can be
530 .Append(FPL("file.txt")),
543 .Append(FPL("file.txt"));
558 ASSERT_FALSE(file_util::NormalizeFilePath(to_sub_a.Append(FPL("file.txt")),
572 << "Failed to create file symlink.";
607 // Link one file to another.
613 << "Failed to create file symlink.";
656 // Create a file
665 // Test recursive case, create a new file
680 // Create a file and a directory
693 // Delete non-recursively and check that only the file is deleted
706 // Create a file and a directory
728 // Create a subdirectory and put a file and two directories inside.
758 // Create a subdirectory and put a file and two directories inside.
787 // Create a file
806 // Create a file
815 CreateTextFile(file_name_to, L"Old file content");
827 // Create a file
850 // Create a file under the directory
880 // Create a file under the directory
915 // Create a file under the directory.
927 // Create a file under the subdirectory.
965 // Create a file under the directory.
977 // Create a file under the subdirectory.
1020 // Create a file under the directory.
1032 // Create a file under the subdirectory.
1067 // Create a file under the directory.
1079 // Create a file under the subdirectory.
1110 // Create a file
1128 // Create a file
1137 CreateTextFile(file_name_to, L"Old file content");
1148 // Create a file
1175 // Create a file under the directory
1182 // Copy the file.
1186 // Copy the file to another location using '..' in the path.
1208 FilePath file_name = temp_dir_.path().Append(L"Test File.txt");
1213 CreateTextFile(file_name, L"New file!");
1416 // Create a file under the directory
1483 FILE *fps[3];
1550 CreateTextFile(test_path, L"test file");
1594 // Check a file
1598 CreateTextFile(test_path, L"test file");