MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetChildren

Method GetChildren

tensorflow/contrib/ignite/kernels/igfs/igfs.cc:177–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177Status IGFS::GetChildren(const string &file_name, std::vector<string> *result) {
178 std::unique_ptr<IGFSClient> client = CreateClient();
179 string path = TranslateName(file_name);
180 path = path + "/";
181
182 CtrlResponse<HandshakeResponse> handshake_response(true);
183 TF_RETURN_IF_ERROR(client->Handshake(&handshake_response));
184
185 CtrlResponse<ListPathsResponse> list_paths_response(false);
186 TF_RETURN_IF_ERROR(client->ListPaths(&list_paths_response, path));
187
188 *result = std::vector<string>();
189 std::vector<IGFSPath> entries = list_paths_response.res.entries;
190
191 for (IGFSPath &value : entries)
192 result->push_back(MakeRelative(value.path, path));
193
194 LOG(INFO) << "Get children completed successfully [file_name=" << file_name
195 << "]";
196
197 return Status::OK();
198}
199
200Status IGFS::GetMatchingPaths(const string &pattern,
201 std::vector<string> *results) {

Callers

nothing calls this directly

Calls 4

MakeRelativeFunction · 0.85
ListPathsMethod · 0.80
HandshakeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected