| 175 | } |
| 176 | |
| 177 | Status 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 | |
| 200 | Status IGFS::GetMatchingPaths(const string &pattern, |
| 201 | std::vector<string> *results) { |
nothing calls this directly
no test coverage detected