Lines Matching full:fs

26 namespace fs = std::filesystem;
29 * Modify the specified file so that fs::remove() can successfully delete it.
35 inline void makeFileRemovable(const fs::path& path) in makeFileRemovable()
39 fs::remove_all(path); in makeFileRemovable()
42 fs::path savePath{path.native() + ".save"}; in makeFileRemovable()
43 fs::rename(savePath, path); in makeFileRemovable()
47 * Modify the specified file so that fs::remove() fails with an exception.
53 inline void makeFileUnRemovable(const fs::path& path) in makeFileUnRemovable()
56 fs::path savePath{path.native() + ".save"}; in makeFileUnRemovable()
57 fs::rename(path, savePath); in makeFileUnRemovable()
60 fs::create_directory(path); in makeFileUnRemovable()
62 // Create a file within the directory. fs::remove() will throw an exception in makeFileUnRemovable()
100 fs::path path = tmpFile->getPath(); in TEST_F()
102 EXPECT_TRUE(fs::exists(path)); in TEST_F()
103 EXPECT_TRUE(fs::is_regular_file(path)); in TEST_F()
105 fs::path parentDir = path.parent_path(); in TEST_F()
115 fs::path path = tmpFileNoData->getPath(); in TEST_F()
117 EXPECT_TRUE(fs::exists(path)); in TEST_F()
118 EXPECT_TRUE(fs::is_regular_file(path)); in TEST_F()
120 fs::path parentDir = path.parent_path(); in TEST_F()
132 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()
135 fs::path path = tmpFile->getPath(); in TEST_F()
145 EXPECT_TRUE(fs::exists(file.getPath())); in TEST_F()
156 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()
159 fs::path path1 = tmpFile->getPath(); in TEST_F()
163 EXPECT_TRUE(fs::exists(tmpFileNoData->getPath())); in TEST_F()
166 fs::path path2 = tmpFileNoData->getPath(); in TEST_F()
179 EXPECT_TRUE(fs::exists(path1)); in TEST_F()
182 EXPECT_FALSE(fs::exists(path2)); in TEST_F()
190 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()
193 fs::path path = tmpFile->getPath(); in TEST_F()
200 EXPECT_TRUE(fs::exists(path)); in TEST_F()
208 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()
211 fs::path path1 = tmpFile->getPath(); in TEST_F()
215 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()
218 fs::path path2 = tmpFileNoData->getPath(); in TEST_F()
239 EXPECT_TRUE(fs::exists(path1)); in TEST_F()
243 EXPECT_TRUE(fs::exists(path2)); in TEST_F()
253 fs::path path{}; in TEST_F()
257 EXPECT_TRUE(fs::exists(path)); in TEST_F()
259 EXPECT_TRUE(fs::exists(path)); in TEST_F()
260 fs::remove(path); in TEST_F()
265 fs::path path{}; in TEST_F()
269 EXPECT_TRUE(fs::exists(path)); in TEST_F()
271 EXPECT_FALSE(fs::exists(path)); in TEST_F()
273 EXPECT_FALSE(fs::exists(path)); in TEST_F()
278 fs::path path{}; in TEST_F()
283 EXPECT_TRUE(fs::exists(path)); in TEST_F()
292 EXPECT_TRUE(fs::exists(path)); in TEST_F()
296 fs::remove(path); in TEST_F()
305 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()
308 fs::path path = tmpFile->getPath(); in TEST_F()
315 EXPECT_FALSE(fs::exists(path)); in TEST_F()
320 EXPECT_FALSE(fs::exists(path)); in TEST_F()
328 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()
352 EXPECT_TRUE(fs::exists(tmpFile->getPath())); in TEST_F()