| 184 | } |
| 185 | |
| 186 | Status 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 | |
| 202 | Status AssetManagerFileSystem::GetFileSize(const string& fname, uint64* s) { |
| 203 | // If fname corresponds to a directory, return early. It doesn't map to an |
nothing calls this directly
no test coverage detected