Lines Matching refs:fs
135 ASSERT_NO_ERROR(fs::make_absolute(temp_store));
269 fs::createUniqueDirectory("file-system-test", TestDirectory));
276 ASSERT_NO_ERROR(fs::remove(TestDirectory.str()));
285 fs::createTemporaryFile("prefix", "temp", FileDescriptor, TempPath));
288 fs::UniqueID F1, F2;
289 ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath), F1));
290 ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath), F2));
297 fs::createTemporaryFile("prefix", "temp", FileDescriptor2, TempPath2));
299 fs::UniqueID D;
300 ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath2), D));
304 ASSERT_NO_ERROR(fs::remove(Twine(TempPath2)));
308 ASSERT_NO_ERROR(fs::create_link(Twine(TempPath), Twine(TempPath2)));
309 fs::UniqueID D2;
310 ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath2), D2));
317 fs::createUniqueDirectory("dir1", Dir1));
318 ASSERT_NO_ERROR(fs::getUniqueID(Dir1.c_str(), F1));
319 ASSERT_NO_ERROR(fs::getUniqueID(Dir1.c_str(), F2));
324 fs::createUniqueDirectory("dir2", Dir2));
325 ASSERT_NO_ERROR(fs::getUniqueID(Dir2.c_str(), F2));
334 fs::createTemporaryFile("prefix", "temp", FileDescriptor, TempPath));
338 ASSERT_NO_ERROR(sys::fs::exists(Twine(TempPath), TempFileExists));
344 ASSERT_NO_ERROR(fs::createTemporaryFile("prefix", "temp", FD2, TempPath2));
348 fs::file_status A, B;
349 ASSERT_NO_ERROR(fs::status(Twine(TempPath), A));
350 ASSERT_NO_ERROR(fs::status(Twine(TempPath2), B));
351 EXPECT_FALSE(fs::equivalent(A, B));
356 ASSERT_NO_ERROR(fs::remove(Twine(TempPath2)));
357 ASSERT_NO_ERROR(fs::remove(Twine(TempPath2)));
358 ASSERT_EQ(fs::remove(Twine(TempPath2), false),
361 std::error_code EC = fs::status(TempPath2.c_str(), B);
363 EXPECT_EQ(B.type(), fs::file_type::file_not_found);
366 ASSERT_NO_ERROR(fs::exists(Twine(TempPath2), TempFileExists));
370 ASSERT_NO_ERROR(fs::createTemporaryFile("prefix", "", TempPath3));
374 ASSERT_NO_ERROR(fs::create_link(Twine(TempPath), Twine(TempPath2)));
376 ASSERT_NO_ERROR(fs::equivalent(Twine(TempPath), Twine(TempPath2), equal));
378 ASSERT_NO_ERROR(fs::status(Twine(TempPath), A));
379 ASSERT_NO_ERROR(fs::status(Twine(TempPath2), B));
380 EXPECT_TRUE(fs::equivalent(A, B));
384 ASSERT_NO_ERROR(fs::remove(Twine(TempPath)));
387 ASSERT_NO_ERROR(fs::remove(Twine(TempPath2)));
390 ASSERT_NO_ERROR(fs::exists(Twine(TempPath), TempFileExists));
401 EXPECT_EQ(fs::createUniqueFile(Twine(Path270), FileDescriptor, TempPath),
407 ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory) + "foo"));
408 ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory) + "foo"));
409 ASSERT_EQ(fs::create_directory(Twine(TestDirectory) + "foo", false),
411 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "foo"));
416 for (fs::directory_iterator i(".", ec), e; i != e; i.increment(ec))
421 fs::create_directories(Twine(TestDirectory) + "/recursive/a0/aa1"));
423 fs::create_directories(Twine(TestDirectory) + "/recursive/a0/ab1"));
424 ASSERT_NO_ERROR(fs::create_directories(Twine(TestDirectory) +
427 fs::create_directories(Twine(TestDirectory) + "/recursive/z0/za1"));
429 fs::create_directories(Twine(TestDirectory) + "/recursive/pop/p1"));
432 for (fs::recursive_directory_iterator i(Twine(TestDirectory)
472 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "/recursive/a0/aa1"));
473 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "/recursive/a0/ab1"));
474 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "/recursive/a0"));
476 fs::remove(Twine(TestDirectory) + "/recursive/dontlookhere/da1"));
477 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "/recursive/dontlookhere"));
478 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "/recursive/pop/p1"));
479 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "/recursive/pop"));
480 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "/recursive/z0/za1"));
481 ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "/recursive/z0"));
482 ASSERT_NO_ERROR(fs
510 fs::file_magic magic;
513 { #magic, magic, sizeof(magic), fs::file_magic::magic }
539 raw_fd_ostream file(file_pathname.c_str(), ErrMsg, sys::fs::F_None);
544 EXPECT_EQ(i->magic, fs::identify_magic(magic));
545 ASSERT_NO_ERROR(fs::remove(Twine(file_pathname)));
556 raw_fd_ostream File(FilePathname.c_str(), ErrMsg, sys::fs::F_Text);
567 raw_fd_ostream File(FilePathname.c_str(), ErrMsg, sys::fs::F_None);
576 ASSERT_NO_ERROR(fs::remove(Twine(FilePathname)));
585 fs::createTemporaryFile("prefix", "temp", FileDescriptor, TempPath));
590 fs::mapped_file_region mfr(FileDescriptor,
592 fs::mapped_file_region::readwrite,
604 fs::mapped_file_region mfr(Twine(TempPath),
605 fs::mapped_file_region::readonly,
616 fs::mapped_file_region m(Twine(TempPath),
617 fs::mapped_file_region::readonly,
623 fs::mapped_file_region mfrrv(std::move(m));
643 ASSERT_NO_ERROR(fs::normalize_separators(Path1));
646 ASSERT_NO_ERROR(fs::normalize_separators(Path2));
649 ASSERT_NO_ERROR(fs::normalize_separators(Path3));
652 ASSERT_NO_ERROR(fs::normalize_separators(Path4));
655 ASSERT_NO_ERROR(fs::normalize_separators(Path5));
658 ASSERT_NO_ERROR(fs::normalize_separators(Path6));