| 106 | } |
| 107 | |
| 108 | Status FileSliceSendOp::GetElementBytes(OpKernelContext* ctx, |
| 109 | const Tensor& file_path_t, |
| 110 | uint64& element_bytes) { |
| 111 | |
| 112 | if (ctx->is_input_dead()) { |
| 113 | element_bytes = 0; |
| 114 | return Status::OK(); |
| 115 | } |
| 116 | |
| 117 | const string& file_path = file_path_t.scalar<tstring>()(); |
| 118 | Env* env = Env::Default(); |
| 119 | |
| 120 | if (env->FileExists(file_path) != Status::OK()) { |
| 121 | element_bytes = 0; |
| 122 | return Status::OK(); |
| 123 | } |
| 124 | |
| 125 | return env->GetFileSize(file_path, &element_bytes); |
| 126 | } |
| 127 | |
| 128 | Status FileSliceSendOp::SendUInt64MetaMsg(OpKernelContext* ctx, |
| 129 | const FrameAndIter& frame_iter, |
nothing calls this directly
no test coverage detected