diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-03-30 11:32:58 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-30 11:35:15 -0700 |
commit | 5eef3a21a0df996c407a78cdfbdcdd11ce4f6f34 (patch) | |
tree | 115904540131c47288b9e5a7402cfeb2d481e28e /tensorflow/contrib/android | |
parent | ff451cae700d0f0f17ff9d2dde32299344b21fb1 (diff) |
Break FileSystem's dependency on ThreadPool.
PiperOrigin-RevId: 191092932
Diffstat (limited to 'tensorflow/contrib/android')
-rw-r--r-- | tensorflow/contrib/android/asset_manager_filesystem.cc | 6 | ||||
-rw-r--r-- | tensorflow/contrib/android/asset_manager_filesystem.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/contrib/android/asset_manager_filesystem.cc b/tensorflow/contrib/android/asset_manager_filesystem.cc index 380a652435..fe2d13e636 100644 --- a/tensorflow/contrib/android/asset_manager_filesystem.cc +++ b/tensorflow/contrib/android/asset_manager_filesystem.cc @@ -19,6 +19,7 @@ limitations under the License. #include "tensorflow/core/lib/strings/str_util.h" #include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/file_system_helper.h" namespace tensorflow { namespace { @@ -243,6 +244,11 @@ bool AssetManagerFileSystem::DirectoryExists(const std::string& fname) { return AAssetDir_getNextFileName(dir.get()) != NULL; } +Status AssetManagerFileSystem::GetMatchingPaths(const string& pattern, + std::vector<string>* results) { + return internal::GetMatchingPaths(this, Env::Default(), pattern, results); +} + Status AssetManagerFileSystem::NewWritableFile( const string& fname, std::unique_ptr<WritableFile>* result) { return errors::Unimplemented("Asset storage is read only."); diff --git a/tensorflow/contrib/android/asset_manager_filesystem.h b/tensorflow/contrib/android/asset_manager_filesystem.h index 665304b5ee..a87ff42ae2 100644 --- a/tensorflow/contrib/android/asset_manager_filesystem.h +++ b/tensorflow/contrib/android/asset_manager_filesystem.h @@ -66,6 +66,9 @@ class AssetManagerFileSystem : public FileSystem { Status DeleteDir(const string& d) override; Status RenameFile(const string& s, const string& t) override; + Status GetMatchingPaths(const string& pattern, + std::vector<string>* results) override; + private: string RemoveAssetPrefix(const string& name); |