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

Function ReadEntireFile

tensorflow/core/kernels/whole_file_read_ops.cc:37–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35namespace tensorflow {
36
37static 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
47class WholeFileReader : public ReaderBase {
48 public:

Callers 2

ReadLockedMethod · 0.70
ComputeMethod · 0.70

Calls 3

NewRandomAccessFileMethod · 0.45
getMethod · 0.45
ReadAllMethod · 0.45

Tested by

no test coverage detected