| 35 | namespace tensorflow { |
| 36 | |
| 37 | static Status ReadEntireFile(Env* env, const string& filename, |
| 38 | string* contents) { |
| 39 | std::unique_ptr<RandomAccessFile> file; |
| 40 | TF_RETURN_IF_ERROR(env->NewRandomAccessFile(filename, &file)); |
| 41 | io::RandomAccessInputStream input_stream(file.get()); |
| 42 | io::BufferedInputStream in(&input_stream, 1 << 20); |
| 43 | TF_RETURN_IF_ERROR(in.ReadAll(contents)); |
| 44 | return Status::OK(); |
| 45 | } |
| 46 | |
| 47 | class WholeFileReader : public ReaderBase { |
| 48 | public: |
no test coverage detected