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

Method GetChildren

tensorflow/contrib/android/asset_manager_filesystem.cc:186–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186Status AssetManagerFileSystem::GetChildren(const string& prefixed_dir,
187 std::vector<string>* r) {
188 std::string path = NormalizeDirectoryPath(prefixed_dir);
189 auto dir =
190 ScopedAssetDir(AAssetManager_openDir(asset_manager_, path.c_str()));
191 if (dir.get() == nullptr) {
192 return errors::NotFound("Directory ", prefixed_dir, " not found.");
193 }
194 const char* next_file = AAssetDir_getNextFileName(dir.get());
195 while (next_file != nullptr) {
196 r->push_back(next_file);
197 next_file = AAssetDir_getNextFileName(dir.get());
198 }
199 return Status::OK();
200}
201
202Status AssetManagerFileSystem::GetFileSize(const string& fname, uint64* s) {
203 // If fname corresponds to a directory, return early. It doesn't map to an

Callers

nothing calls this directly

Calls 5

ScopedAssetDirClass · 0.85
NotFoundFunction · 0.85
c_strMethod · 0.80
getMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected