| 10613 | } |
| 10614 | |
| 10615 | int Client::getdir(const char *relpath, list<string>& contents, |
| 10616 | const UserPerm& perms) |
| 10617 | { |
| 10618 | ldout(cct, 3) << "getdir(" << relpath << ")" << dendl; |
| 10619 | tout(cct) << "getdir" << std::endl; |
| 10620 | tout(cct) << relpath << std::endl; |
| 10621 | |
| 10622 | dir_result_t *d; |
| 10623 | int r = opendir(relpath, &d, perms); |
| 10624 | if (r < 0) |
| 10625 | return r; |
| 10626 | |
| 10627 | getdir_result gr; |
| 10628 | gr.contents = &contents; |
| 10629 | gr.num = 0; |
| 10630 | r = readdir_r_cb(d, _getdir_cb, (void *)&gr); |
| 10631 | |
| 10632 | closedir(d); |
| 10633 | |
| 10634 | if (r < 0) |
| 10635 | return r; |
| 10636 | return gr.num; |
| 10637 | } |
| 10638 | |
| 10639 | |
| 10640 | /****** file i/o **********/ |
no outgoing calls
no test coverage detected