MCPcopy Create free account
hub / github.com/ceph/ceph / getdir

Method getdir

src/client/Client.cc:10615–10637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10613}
10614
10615int 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 **********/

Callers 5

play_traceMethod · 0.80
clean_dirMethod · 0.80
full_walkMethod · 0.80
read_dirsMethod · 0.80
random_walkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected