MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / RemoveFile

Function RemoveFile

src/twtest/hierdatabase_t.cpp:82–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82static void RemoveFile(cHierDatabase::iterator& iter, const TSTRING& filename)
83{
84 TCOUT << "Removing object " << filename << std::endl;
85 if (iter.SeekTo(filename.c_str()))
86 {
87 if (iter.CanDescend())
88 {
89 TCOUT << "Can't delete object; it still has children." << std::endl;
90 }
91 else
92 {
93 iter.RemoveData();
94 iter.DeleteEntry();
95 }
96 }
97 else
98 {
99 TCOUT << "Unable to find object " << filename << std::endl;
100 }
101}
102
103static void ChDir(cHierDatabase::iterator& iter, const TSTRING& filename)
104{

Callers 1

TestHierDatabaseBasicFunction · 0.70

Calls 5

c_strMethod · 0.80
RemoveDataMethod · 0.80
DeleteEntryMethod · 0.80
SeekToMethod · 0.45
CanDescendMethod · 0.45

Tested by 1

TestHierDatabaseBasicFunction · 0.56