MCPcopy Create free account
hub / github.com/apache/arrow / TestDeleteRootDirContents

Method TestDeleteRootDirContents

cpp/src/arrow/filesystem/test_util.cc:323–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void GenericFileSystemTest::TestDeleteRootDirContents(FileSystem* fs) {
324 if (have_flaky_directory_tree_deletion()) GTEST_SKIP() << "Flaky directory deletion";
325
326 ASSERT_OK(fs->CreateDir("AB/CD"));
327 CreateFile(fs, "AB/abc", "");
328
329 auto st = fs->DeleteRootDirContents();
330 if (!st.ok()) {
331 // Not all filesystems support deleting root directory contents
332 ASSERT_TRUE(st.IsInvalid() || st.IsNotImplemented());
333 AssertAllDirs(fs, {"AB", "AB/CD"});
334 AssertAllFiles(fs, {"AB/abc"});
335 } else {
336 AssertAllDirs(fs, {});
337 AssertAllFiles(fs, {});
338 }
339}
340
341void GenericFileSystemTest::TestDeleteFile(FileSystem* fs) {
342 ASSERT_OK(fs->CreateDir("AB"));

Callers

nothing calls this directly

Calls 7

CreateFileFunction · 0.85
AssertAllDirsFunction · 0.85
AssertAllFilesFunction · 0.85
CreateDirMethod · 0.45
DeleteRootDirContentsMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected