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()
166 EXPECT_TRUE(fs::exists(path)); in TEST()
174 EXPECT_TRUE(fs::exists(file1.getPath())); in TEST()
177 fs::path path1 = file1.getPath(); in TEST()
182 EXPECT_TRUE(fs::exists(file2.getPath())); in TEST()
185 fs::path path2 = file2.getPath(); in TEST()
206 EXPECT_TRUE(fs::exists(path1)); in TEST()
210 EXPECT_TRUE(fs::exists(path2)); in TEST()
221 fs::path path{}; in TEST()
225 EXPECT_TRUE(fs::exists(path)); in TEST()
227 EXPECT_FALSE(fs::exists(path)); in TEST()
232 fs::path path{}; in TEST()
236 EXPECT_TRUE(fs::exists(path)); in TEST()
238 EXPECT_FALSE(fs::exists(path)); in TEST()
240 EXPECT_FALSE(fs::exists(path)); in TEST()
245 fs::path path{}; in TEST()
250 EXPECT_TRUE(fs::exists(path)); in TEST()
259 EXPECT_TRUE(fs::exists(path)); in TEST()
263 fs::remove(path); in TEST()
274 EXPECT_TRUE(fs::exists(file.getPath())); in TEST()
277 fs::path path = file.getPath(); in TEST()
284 EXPECT_FALSE(fs::exists(path)); in TEST()
289 EXPECT_FALSE(fs::exists(path)); in TEST()
297 EXPECT_TRUE(fs::exists(file.getPath())); in TEST()
323 EXPECT_TRUE(fs::exists(file.getPath())); in TEST()