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

Class ScopedAssetDir

tensorflow/contrib/android/asset_manager_filesystem.cc:51–64  ·  view source on GitHub ↗

Closes the given AAssetDir when variable is destructed.

Source from the content-addressed store, hash-verified

49
50// Closes the given AAssetDir when variable is destructed.
51class ScopedAssetDir {
52 public:
53 ScopedAssetDir(AAssetDir* asset_dir) : asset_dir_(asset_dir) {}
54 ~ScopedAssetDir() {
55 if (asset_dir_ != nullptr) {
56 AAssetDir_close(asset_dir_);
57 }
58 }
59
60 AAssetDir* get() const { return asset_dir_; }
61
62 private:
63 AAssetDir* asset_dir_;
64};
65
66class ReadOnlyMemoryRegionFromAsset : public ReadOnlyMemoryRegion {
67 public:

Callers 2

GetChildrenMethod · 0.85
DirectoryExistsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected