| 5 | #include "acl_cpp/lib_acl.hpp" |
| 6 | |
| 7 | static void ls_file(acl::scan_dir& scan, const char* path, bool recursive, |
| 8 | bool fullpath) |
| 9 | { |
| 10 | if (scan.open(path, recursive) == false) { |
| 11 | logger_error("open path: %s error: %s", |
| 12 | path, acl::last_serror()); |
| 13 | return; |
| 14 | } |
| 15 | |
| 16 | int nfiles = 0; |
| 17 | const char* filename; |
| 18 | |
| 19 | while ((filename = scan.next_file(fullpath)) != NULL) { |
| 20 | logger("filename: %s, path: %s", filename, scan.curr_path()); |
| 21 | nfiles++; |
| 22 | } |
| 23 | |
| 24 | logger("==========================================================="); |
| 25 | logger("total file count: %d", nfiles); |
| 26 | } |
| 27 | |
| 28 | static void ls_dir(acl::scan_dir& scan, const char* path, bool recursive, |
| 29 | bool fullpath) |
no test coverage detected
searching dependent graphs…