MCPcopy Create free account
hub / github.com/acl-dev/acl / rmdir_on_empty2

Function rmdir_on_empty2

lib_acl_cpp/samples/scan_rmdir/main.cpp:123–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static bool rmdir_on_empty2(const char* path, bool recursive, bool rmdir_on)
124{
125 acl::scan_dir scan;
126
127 if (scan.open(path, recursive, rmdir_on) == false) {
128 printf("open path: %s error: %s\r\n", path, acl::last_serror());
129 return false;
130 }
131
132 if (rmdir_on) {
133 scan.set_rmdir_callback(rmdir_fn, &scan);
134 }
135
136 scan_rmdir(scan);
137 return true;
138}
139
140static void usage(const char* procname)
141{

Callers 1

mainFunction · 0.85

Calls 4

scan_rmdirFunction · 0.85
set_rmdir_callbackMethod · 0.80
last_serrorFunction · 0.50
openMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…