Lines Matching full:fs
26 namespace fs = std::filesystem;
29 * Modify the specified file so that fs::remove() fails with an exception.
35 inline void makeFileUnRemovable(const fs::path& path) in makeFileUnRemovable()
38 fs::path savePath{path.native() + ".save"}; in makeFileUnRemovable()
39 fs::rename(path, savePath); in makeFileUnRemovable()
42 fs::create_directory(path); in makeFileUnRemovable()
44 // Create a file within the directory. fs::remove() will throw an exception in makeFileUnRemovable()
50 * Modify the specified file so that fs::remove() can successfully delete it.
56 inline void makeFileRemovable(const fs::path& path) in makeFileRemovable()
60 fs::remove_all(path); in makeFileRemovable()
63 fs::path savePath{path.native() + ".save"}; in makeFileRemovable()
64 fs::rename(savePath, path); in makeFileRemovable()
71 fs::path path = file.getPath(); in TEST()
73 EXPECT_TRUE(fs::exists(path)); in TEST()
74 EXPECT_TRUE(fs::is_regular_file(path)); in TEST()
76 fs::path parentDir = path.parent_path(); in TEST()
89 EXPECT_TRUE(fs::exists(file1.getPath())); in TEST()
92 fs::path path = file1.getPath(); in TEST()
102 EXPECT_TRUE(fs::exists(file2.getPath())); in TEST()
112 EXPECT_TRUE(fs::exists(file1.getPath())); in TEST()
115 fs::path path1 = file1.getPath(); in TEST()
120 EXPECT_TRUE(fs::exists(file2.getPath())); in TEST()
123 fs::path path2 = file2.getPath(); in TEST()
136 EXPECT_TRUE(fs::exists(path1)); in TEST()
139 EXPECT_FALSE(fs::exists(path2)); in TEST()
147 EXPECT_TRUE(fs::exists(file.getPath())); in TEST()
150 fs::path path = file.getPath(); in TEST()
157 EXPECT_TRUE(fs::exists(path)); in TEST()
165 EXPECT_TRUE(fs::exists(file1.getPath())); in TEST()
168 fs::path path1 = file1.getPath(); in TEST()
173 EXPECT_TRUE(fs::exists(file2.getPath())); in TEST()
176 fs::path path2 = file2.getPath(); in TEST()
197 EXPECT_TRUE(fs::exists(path1)); in TEST()
201 EXPECT_TRUE(fs::exists(path2)); in TEST()
212 fs::path path{}; in TEST()
216 EXPECT_TRUE(fs::exists(path)); in TEST()
218 EXPECT_FALSE(fs::exists(path)); in TEST()
223 fs::path path{}; in TEST()
227 EXPECT_TRUE(fs::exists(path)); in TEST()
229 EXPECT_FALSE(fs::exists(path)); in TEST()
231 EXPECT_FALSE(fs::exists(path)); in TEST()
236 fs::path path{}; in TEST()
241 EXPECT_TRUE(fs::exists(path)); in TEST()
250 EXPECT_TRUE(fs::exists(path)); in TEST()
254 fs::remove(path); in TEST()
265 EXPECT_TRUE(fs::exists(file.getPath())); in TEST()
268 fs::path path = file.getPath(); in TEST()
275 EXPECT_FALSE(fs::exists(path)); in TEST()
280 EXPECT_FALSE(fs::exists(path)); in TEST()
288 EXPECT_TRUE(fs::exists(file.getPath())); in TEST()
314 EXPECT_TRUE(fs::exists(file.getPath())); in TEST()