| 125 | : asset_manager_(asset_manager), prefix_(prefix) {} |
| 126 | |
| 127 | Status AssetManagerFileSystem::FileExists(const string& fname) { |
| 128 | string path = RemoveAssetPrefix(fname); |
| 129 | auto asset = ScopedAsset( |
| 130 | AAssetManager_open(asset_manager_, path.c_str(), AASSET_MODE_RANDOM)); |
| 131 | if (asset.get() == nullptr) { |
| 132 | return errors::NotFound("File ", fname, " not found."); |
| 133 | } |
| 134 | return Status::OK(); |
| 135 | } |
| 136 | |
| 137 | Status AssetManagerFileSystem::NewRandomAccessFile( |
| 138 | const string& fname, std::unique_ptr<RandomAccessFile>* result) { |
nothing calls this directly
no test coverage detected