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

Method FileExists

tensorflow/contrib/android/asset_manager_filesystem.cc:127–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 : asset_manager_(asset_manager), prefix_(prefix) {}
126
127Status 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
137Status AssetManagerFileSystem::NewRandomAccessFile(
138 const string& fname, std::unique_ptr<RandomAccessFile>* result) {

Callers

nothing calls this directly

Calls 4

ScopedAssetClass · 0.85
NotFoundFunction · 0.85
c_strMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected