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

Function check_dir

lib_acl_cpp/samples/dircmp/main.cpp:133–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133static bool check_dir(acl::scan_dir& scan, const char* to, int* ndiff)
134{
135 const char* rpath = scan.curr_path();
136 if (rpath == false)
137 {
138 logger_error("get from's path error: %s, to: %s",
139 acl::last_serror(), to);
140 return false;
141 }
142
143 SKIP(rpath);
144
145 acl::string to_path;
146 to_path << to << SEP << rpath;
147 // printf(">>to_path: %s, to: %s\r\n", to_path.c_str(), to);
148
149 if (access(to_path.c_str(), 0) == 0)
150 return true;
151
152 (*ndiff)++;
153 logger("dir diff: %s, error: %s", to_path.c_str(), acl::last_serror());
154
155 return true;
156}
157
158static void do_cmp(const acl::string& from, const acl::string& to)
159{

Callers 1

do_cmpFunction · 0.70

Calls 3

curr_pathMethod · 0.80
last_serrorFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…